Bug 55521

Summary: GObject derived types do not chain finalize methods to their parent class
Product: poppler Reporter: Glenn Rice <glennricster>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Glenn Rice 2012-10-02 02:10:17 UTC
The PopplerPage and PopplerDocument types, which are subclassed from a GObject, override the finalize methods, but do not properly call the parent classes finalize method at the end as they should.
Comment 1 Glenn Rice 2012-10-05 19:26:18 UTC
I have noticed that there are other gobject derived classes that also do not properly chain up the finalize method to the parent classes.  For example the PopplerFontInfo class does not do this either.  However, some do.  For example PopplerAttachment does.

Not calling the parent classes finalize method is a potential memory leak.  This also prevents some registered callbacks from being called at destruction time as needed.
Comment 2 Carlos Garcia Campos 2012-10-06 08:31:05 UTC
Fixed in master and 0.20 branch. Thanks for reporting.
Comment 3 Glenn Rice 2012-10-06 15:58:12 UTC
Thank you.  Looks good.  By the way, I found this while attempting to wrap the poppler-glib library via gmmproc.  I will make the resulting poppler-glibmm available at some point.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.