Closed Therzok closed 8 years ago
Reason for closing?
The problem is that with current 2-12, we seemingly leak GLib objects passed into GLib.
Without this patch, we leak pure Gtk widgets, i.e. Gtk.Dialog.VBox is a permanent leak.
I'm trying to figure fix everything up before I send another PR.
Revert the memory fixes added in https://github.com/mono/gtk-sharp/pull/136 and only kept InitiallyOwned logic.
The problem is that whenever you'd create an object in managed, i.e. new ListStore(typeof(string))
This would create an object that would never get unref'd after being owned by managed. This caused the reference to remain a strong ref, so the finalizers would never work.
On the other hand, we'd have a too big refcount at the time of Disposal, meaning memory wouldn't be cleaned up.
Kept InitiallyUnowned logic from master that would wrongly ref a Gtk.Object.