After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621710 - Drawable get_image() ref leak
Drawable get_image() ref leak
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-06-16 00:10 UTC by Kevin Ryde
Modified: 2010-11-21 19:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
leaking program (148 bytes, text/x-perl)
2010-06-16 00:10 UTC, Kevin Ryde
  Details
patch (1.22 KB, patch)
2010-06-16 00:11 UTC, Kevin Ryde
none Details | Review
patch and test case (2.96 KB, patch)
2010-11-17 00:24 UTC, Kevin Ryde
committed Details | Review
tests (1.75 KB, patch)
2010-11-17 20:47 UTC, Kevin Ryde
committed Details | Review

Description Kevin Ryde 2010-06-16 00:10:54 UTC
Created attachment 163752 [details]
leaking program

I think gdk_drawable_get_image() should have _noinc on its return, per attached diff.  Attached leak.pl otherwise grows apparently forever.
Comment 1 Kevin Ryde 2010-06-16 00:11:53 UTC
Created attachment 163753 [details] [review]
patch
Comment 2 Kevin Ryde 2010-11-17 00:24:43 UTC
Created attachment 174639 [details] [review]
patch and test case

This diff with a test case exercising the problem.
Comment 3 Kevin Ryde 2010-11-17 20:47:58 UTC
Created attachment 174715 [details] [review]
tests

A couple of test cases for copy_to_image() along the same lines.  Its refcounting is already right, but just to exercise it.  This diff goes on top of the get_image() one.
Comment 4 Torsten Schoenfeld 2010-11-21 19:30:10 UTC
Looks good, committed.  Thanks.