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 152323 - Binding to a named slot causes a memory leak according to memprof
Binding to a named slot causes a memory leak according to memprof
Status: RESOLVED FIXED
Product: libsigc++
Classification: Bindings
Component: adaptors
2.0
Other Linux
: High critical
: ---
Assigned To: Martin Schulze
Martin Schulze
Depends on:
Blocks:
 
 
Reported: 2004-09-10 18:54 UTC by Philip Langdale
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (762 bytes, text/plain)
2004-09-10 18:54 UTC, Philip Langdale
Details
Memprof leak log (1.96 KB, text/plain)
2004-09-10 18:55 UTC, Philip Langdale
Details

Description Philip Langdale 2004-09-10 18:54:18 UTC
Compile and run the attached test case under memprof and observe that binding to
a named slot appears to cause a leak (or two).

Then recompile with I_WANT_TO_LEAK undefined and observe that creating and
binding the slot all inline does not cause the leak
Comment 1 Philip Langdale 2004-09-10 18:54:59 UTC
Created attachment 31478 [details]
Test case

Test case to demonstrate the memory leak.
Comment 2 Philip Langdale 2004-09-10 18:55:41 UTC
Created attachment 31479 [details]
Memprof leak log

This is the log of running memprof against the test case.
Comment 3 Martin Schulze 2004-10-02 18:32:13 UTC
Thanks for pointing this out.
The problem was that the functor stored in struct typed_slot_rep never got
destroyed because there is no virtual dtor.
I've fixed this in cvs.