Bug 55521 - GObject derived types do not chain finalize methods to their parent class
Summary: GObject derived types do not chain finalize methods to their parent class
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 02:10 UTC by Glenn Rice
Modified: 2012-10-06 15:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.