I reported this as bug #1724347, but it seems like the bug-list is less
active than the forum list, so I’ll repost it here just in case someone
has an idea to help me.
I have a ruby defined GObject that is a singleton and is “alive” as long
the Application is running.
This GObject represents the state of a machine. I use several views
in glade so the user can get different views of the machine depending on
their interest.The views are loaded with libglade
then “filled” with several controls programatically.
This controls have to update their values when the GObject emits
far so good, I’ve set this up and it works well.
The problem is that when I destroy a view, the GRClosure for the signal
keeps around since it is attached to the main GObject (the one
the state of the machine) and even doing a signal_disconnect_handler
not free it. Since the callback has to reference the view, that means
the view doesn’t get garbage collected leading to a seious memory leak
I see no way to avoid. The reasonable behaviour would be to dettach the
callback from the GObject once it has been disconnected.
Attached to the bug report is a simple test that reproduces the bug.
Cheers, (and thanks for your incredible work)