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 695045 - TreeSet leaks references
TreeSet leaks references
Status: RESOLVED FIXED
Product: libgee
Classification: Platform
Component: general
0.6.x
Other Linux
: Normal major
: ---
Assigned To: libgee-maint
libgee-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-03 05:24 UTC by Eric Gregory
Modified: 2013-03-04 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric Gregory 2013-03-03 05:24:24 UTC
Attached is a sample program in Vala showing how Gee's TreeSet can leak references.  The test contains a Counter class which counts the number of instances of itself that exist.

The third test case demonstrates the bug -- a TreeSet goes out of scope without manually clearing the contents.  Even though no other references to its contents exist, the counter indicates that they were never freed!

One potential solution would be for TreeSet to add a destructor which calls clear().  Many other Gee collections do this, I think it would work here.


The first step from here is for someone to check if this still occurs in git master.
Comment 1 Maciej (Matthew) Piechotka 2013-03-03 11:37:14 UTC
I see where the problem is. Should be fixed in tomorrow release.
Comment 2 Maciej (Matthew) Piechotka 2013-03-04 17:26:05 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.