[vlc-devel] commit: Revived vout_Destroy from the dead. (Laurent Aimar )
Pierre d'Herbemont
pdherbemont at free.fr
Mon Jul 21 17:58:54 CEST 2008
Quoting Rémi Denis-Courmont <rdenis at simphalempin.com>:
> Le jeudi 17 juillet 2008 22:44:43 Pierre d'Herbemont, vous avez écrit :
> > > You cannot remove the vlc_object_release inside vout_Destroy or
> > > everyone
> > > will have to call vout_Close AND vlc_object_release. (That's why
> > > vout_Destroy)
> >
> > We would call vout_Close+ vlc_object_release vout_CloseAndRelease().
> > It's closer to reality.
>
> Two different concept are being mixed up here.
Yes, we've mixed up threads and objects. Two different things.
> Holding a reference to an object allows you to set/get/trigger its variables,
> emit a log message (though this might not be the brightest idea), and, in
> some "specific" cases do some more thread-safe specific things.
>
> Owning an object is a different thing. Then you're responsible for releasing
> its "non-memory" resources (especially threads and shared object mappings).
Perfectly, a clean concept would have allowed to separately be able to:
- create/yield
- release
an object
And to:
- start
- stop
Its threads.
Pierre.
More information about the vlc-devel
mailing list