Merge pull request #74 from GSharpKit/memory

Free all internal signals, else the garbage collector is not able to free the object.
This commit is contained in:
Harry 2019-01-08 15:33:08 +01:00 committed by GitHub
commit d1a2124238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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; }