[Mono-bugs] [Bug 361772] New: The signal handling leaks

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 14 06:49:56 EST 2008


           Summary: The signal handling leaks
           Product: gtk#
           Version: 2.x
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: gtk-sharp
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: anders at iola.dk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=194877)
 --> (https://bugzilla.novell.com/attachment.cgi?id=194877)
test case that demonstrate this

When adding a gtk member of some object to a table, if the object has a signal
handler attached to one of its member, doesn't have to be the one added, then
it will not be garbage collected once the table is destroyed.

If the signal handler is a member function of the object, the whole object will
continue to live on forever (or until the signal is removed again :(), and if
it's just an delegate that writes something like hello.world only the delegate
will be around forever.

The problem seems to be the way Glib/Signal.cs is implemented.

Added a test case which demonstrates this. Just look with heap shot and you'll
see the problem.

This can be quite a serious memory leak since the object can hold references to
a bunch of other stuff and thus the single reference to the object does that a
lot of other code can't be garbage collected.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list