Skip to content

[th/test-weak-notify] gobject/tests: add test checking that GWeakRef is cleared in GWeakNotify

Thomas Haller requested to merge th/test-weak-notify into main

g_object_weak_ref() refers to GWeakRef as thread safe replacement. However, it's not clear to me, how GWeakRef is a replacement for a callback. I think, it means, that you combine g_object_weak_ref() with GWeakRef, to both hold a thread-safe weak reference and get a notification on destruction.

Add a test, that GWeakRef is already cleared inside the GWeakNotify callback.

Merge request reports