GNOME Bugzilla – Bug 491845
Add essential unreffing to non-primitives
Last modified: 2019-03-27 20:11:37 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.
See the test script I put in bug 446277 for an example.
Created attachment 98204 [details] [review] Proposed fix This patch mixes into the Relation and StateSet classes a new __del__ method with the proper unreffing.
Created attachment 98206 [details] [review] Proposed fix Wrapped unreffs in try/except.
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?
*** This bug has been marked as a duplicate of 446277 ***