Closed Therzok closed 7 years ago
Removes finalizer queues on the UI thread with simple unrefs. GLib is thread safe by itself, so unref-ing shouldn't cause any issues.
GLib might be threadsafe, but Gtk is not. The final unref causes the dispose and finalize methods to be invoked, and they must be invoked on the main thread.
By reading here: https://developer.gnome.org/gtk2/stable/GtkObject.html#gtk-object-destroy
The unrefs are all called by Destroy, which is called on the UI thread. The rest of the objects are thread-safe due to not being tied to GtkObject.
That doesn't account for the native Dispose, the native finalize or the safe usage of g_object_weak_ref which will now become unsafe.
Superseded by #200
This patch introduces 2 new mechanisms: