Free all internal signals, else the garbage collector is not able to free the object.

This commit is contained in:
Mikkel Kruse Johnsen 2019-01-08 11:39:25 +01:00
parent 304eefde96
commit 9764260931

View file

@ -73,6 +73,16 @@ namespace GLib {
tref.Dispose ();
else
tref.QueueUnref ();
// Free all internal signals, else the garbage collector is not
// able to free the object.
if (signals != null)
{
foreach (var sig in signals.Keys)
signals[sig].Free ();
}
signals = null;
}
public static bool WarnOnFinalize { get; set; }