[gst-devel] memory management choices
Wim Taymans
wim.taymans at chello.be
Sat Nov 9 15:23:01 CET 2002
> I'm thinking about how to manage the lifetime of GstObjects in the C++
> bindings. It's an issue because use of refcounting by default will
> probably make the C++ API look very different - like gdkmm.
>
> GstObjects seem to require refcounting by default, but there is also a
> gst_object_destroy() function, making them similar to GtkObjects.
The idea is to make the refcounting similar to GtkObject.
That said, we've had a few rounds of getting the refcounting right,
already,
but it's all still blurry inside my head, mostly because of a lack of
knowledge
about GtkObject/Gobject refcounting and confusion about the changes
between gtk1.2 and 2.0 refcounting. Maybe it's time to go over this
again...
>
> I know that GtkObjects (such as widgets) respond gracefully to
> gtk_object_destroy() (for instance, child widgets disappear visually
> from their containers). Is that also true of GstObjects, or is
> gst_object_destroy() something that should only be used in exceptional
> circumstances?
AFAIK, _destroy forcefully destroys the object, like _unref on an object
with
a refcount of 1. This should also work on GstObjects.
Are you asking this because you are experiencing problems?
Wim
More information about the gstreamer-devel
mailing list