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 644039 - Do not leak python references when using the gobject.property() helper.
Do not leak python references when using the gobject.property() helper.
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 639597
 
 
Reported: 2011-03-06 20:23 UTC by Steve Frécinaux
Modified: 2011-03-07 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not leak python references when using the gobject.property() helper. (1.37 KB, patch)
2011-03-06 20:23 UTC, Steve Frécinaux
none Details | Review
Do not leak python references when using the gobject.property() helper. (2.73 KB, patch)
2011-03-06 20:38 UTC, Steve Frécinaux
committed Details | Review

Description Steve Frécinaux 2011-03-06 20:23:52 UTC
The previous behaviour caused references to be held forever, preventing
the objects from ever being finalized.
Comment 1 Steve Frécinaux 2011-03-06 20:23:55 UTC
Created attachment 182630 [details] [review]
Do not leak python references when using the gobject.property() helper.

Since this helper was storing plain references in a long-lived dict, the
refcount for the instances would never drop to zero, and so they would
never get finalized.
Comment 2 Steve Frécinaux 2011-03-06 20:38:40 UTC
Created attachment 182631 [details] [review]
Do not leak python references when using the gobject.property() helper.

Since this helper was storing plain references in a long-lived dict, the
refcount for the instances would never drop to zero, and so they would
never get finalized.

This fixes the previous patch and adds a new test.
Comment 3 johnp 2011-03-07 16:04:36 UTC
Comment on attachment 182631 [details] [review]
Do not leak python references when using the gobject.property() helper.

looks good
Comment 4 johnp 2011-03-07 16:19:05 UTC
Attachment 182631 [details] pushed as 7bece91 - Do not leak python references when using the gobject.property() helper.