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 491845 - Add essential unreffing to non-primitives
Add essential unreffing to non-primitives
Status: RESOLVED DUPLICATE of bug 446277
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Eitan Isaacson
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2007-10-30 20:14 UTC by Eitan Isaacson
Modified: 2019-03-27 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (1022 bytes, patch)
2007-10-30 20:16 UTC, Eitan Isaacson
none Details | Review
Proposed fix (1.05 KB, patch)
2007-10-30 20:21 UTC, Eitan Isaacson
none Details | Review
Proposed fix (1.28 KB, patch)
2007-11-01 21:18 UTC, Eitan Isaacson
needs-work Details | Review

Description Eitan Isaacson 2007-10-30 20:14:23 UTC
All non primitive data types that we get over the wire need to be explicitly unreffed Accessibility.Accessible already has it in it's mixin. But Accessibility.Relation and Accessibility.StateSet do not. I might be missing other classes too.
Comment 1 Eitan Isaacson 2007-10-30 20:14:57 UTC
See the test script I put in bug 446277 for an example.
Comment 2 Eitan Isaacson 2007-10-30 20:16:22 UTC
Created attachment 98204 [details] [review]
Proposed fix

This patch mixes into the Relation and StateSet classes a new __del__ method with the proper unreffing.
Comment 3 Eitan Isaacson 2007-10-30 20:21:09 UTC
Created attachment 98206 [details] [review]
Proposed fix

Wrapped unreffs in try/except.
Comment 4 Eitan Isaacson 2007-11-01 21:18:47 UTC
Created attachment 98344 [details] [review]
Proposed fix

In light of the reversal of the patch in bug #490202, this patch unreffs a StateSet only once. Although for some reason a Relation needs to be unreffed twice. 
Obviously the RelationSet was not affected by the patch from bug #490202 since it is a native list instance. But for some reason it's list members are reffed twice.

Could anyone share why?
Comment 5 Eitan Isaacson 2007-11-01 21:29:18 UTC

*** This bug has been marked as a duplicate of 446277 ***