[poppler] Some C++11 in poppler?
Carlos Garcia Campos
carlosgc at gnome.org
Mon May 30 13:46:28 UTC 2016
Albert Astals Cid <aacid at kde.org> writes:
> Hi guys, what do you think of us adding "some" of the C++11 features in
> poppler?
Perfect!
> One that would be useful for example is std::unique_ptr, that is a class that
> will take ownership of a pointer and delete it when it goes out of scope.
>
> That's really useful in poppler where we have lots of
>
> if (!foo) { error; return; }
>
> where we randomly forget to delete stuff.
Indeed.
> See the patch Vincent proposed to fix the leak of colorMap in https://
> bugs.freedesktop.org/attachment.cgi?id=124163
>
> It's tricky and noone guarantees it will not break next time we introduce
> another check somewhere.
>
> What do you think?
I'm totally in favor of using C++ 11. We are no longer merging xpdf
patches, and even when we do that we do it manually, so I think we can
stop worring about diverging too much from xpdf original code.
> Cheers,
> Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler
--
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 180 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20160530/bd24b8f0/attachment.sig>
More information about the poppler
mailing list