[poppler] Some C++11 in poppler?

Adrian Johnson ajohnson at redneon.com
Mon May 30 12:57:25 UTC 2016


On 30/05/16 06:20, Albert Astals Cid wrote:
> Hi guys, what do you think of us adding "some" of the C++11 features in 
> poppler?

I am in favor of using C++11.

> 
> 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.
> 
> 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?
> 
> Cheers,
>   Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler
> 



More information about the poppler mailing list