[vlc-devel] commit: Revived vout_Destroy from the dead. (Laurent Aimar )
Pierre d'Herbemont
pdherbemont at free.fr
Thu Jul 17 21:44:43 CEST 2008
On Jul 17, 2008, at 9:29 PM, Laurent Aimar wrote:
> On Thu, Jul 17, 2008, Pierre d'Herbemont wrote:
>>
>> On Jul 17, 2008, at 7:58 PM, git version control wrote:
>>
>>> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jul
>>> 17 19:53:47 2008 +0200| [dd066314d5dde1a5d828d2c51c0296dd7b04bac7]
>>>
>>> Revived vout_Destroy from the dead.
>>> No you CANNOT release a vout by vlc_object_release if you have
>>> created
>>> it by vout_Request or vout_Create.
>>
>> That do need a special case handling to make sure the object isn't
>> destroyed if vout_Destructor hasn't been called first.
> No. The vout will NEVER be destroyed by someone else. If you create a
> vout, you are the only one that call destroy on it.
Well, I am not saying this should happen, I am saying that it is a
good idea to track bad usage. (Such as what leak check and so on)...
Don't worry I'll implement.
>
>> I am re-reading that code and vout_Destroy is actually vout_Close.
>> Because vout_Destroy doesn't actually destroy the vout, but only
>> close
>> it.
> I would prefer keeping vout_Create/Destroy (Create/Close is
> confusing).
> Beside it actually destroy the object unless someone has done a
> vlc_object_find
> on it.
Well, so that's my point. We can't assume that after vout_Destroy the
object is destroyed... Well that probably sound like too much wording,
but I insist here :P
>> If there is no objection, I'll change that confusing name (and
>> probably remove the vlc_object_release from here).
> 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.
Pierre.
More information about the vlc-devel
mailing list