Re: Casting from a wrapped class to a possible implemented interface



José Alburquerque wrote:
My concern, however, is that because the newly created Gst::ElementInterfaced class is not "wrapped", it doesn't look like it will be destroyed when all references to the underlying gobject are gone.

I believe I found a solution to this using g_object_weak_ref <http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-weak-ref> <http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GWeakNotify> to notify the unwrapped instance when the gobject is destroyed. This may enable casting from elements to interfaces that the underlying C object implements. Thoughts?

--
José Alburquerque
jaalburquerque cox net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]