[gst-devel] explicit g_object_dispose on anything?

Benjamin Otte in7y118 at public.uni-hamburg.de
Fri Feb 6 03:54:10 CET 2004


On Fri, 6 Feb 2004, Mathrick wrote:

> > Maybe we need to do s/dispose/finalize/ everywhere?
>
> No. You cannot safely replace dispose with finalize. In fact, you
> should't even consider them in terms of alternatives, they're
> complementary and supposed to be (eventually) called in order.
>
For C code it seems to be completely uninteresting which fnction to use.

> > I'm not even sure what the difference between dispose and finalize is.
>
> It's kinda substantial, although not obvious and for many uses it may go
> unnoticed.
>
> > Anyone knows?
>
> Yep. http://www.le-hacker.org/papers/gobject/ch04s02.html ;)
>
That still doesn't tell me what i"m supposed to do where. What memory am I
supposed to release in _dispose, what memory do I release in _finalize?

I guess we should leave that to the bindings writers who can figure it out
themselves. They're the ones invoking _dispose directly ;)

Benjamin





More information about the gstreamer-devel mailing list