On Mon May 19 09:52:32 2025 +0000, Nikolay Sivov wrote:
It should be possible to test? Also, there it's very generic and could be reused, even if only at source level.
The attached tests show that releasing the weak ref interface releases the main object as well. So the weak ref interface resides in the main object. As for releasing the main object while the weak ref is still alive. I guess you can release most of the allocated memory in uisettings_Release() when ref_strong is 0? It's just the wrapper object, for example `struct uisettings`, for the interfaces and refcount is still active.
[weakref-tests.diff](/uploads/805f58bc9206095968936f38039f9605/weakref-tests.diff)