[vlc-devel] RE : [PATCH] -- more small patches for Linux and qt4
brezhoneg1 at yahoo.fr
Mon Mar 9 13:26:45 CET 2009
> -----Message d'origine-----
> De : brezhoneg1 [mailto:brezhoneg1 at yahoo.fr]
> Envoyé : lundi 9 mars 2009 12:02
> À : 'vlc-devel at videolan.org'
> Objet : RE : [vlc-devel] [PATCH] -- more small patches for Linux and
> > > Patch3: missing vlc_object_release in qt4 menu.cpp
> > > ---------------------------------------------------
> > This seems wrong. If there really is a systemic reference leak, then
> > should
> > simply remove the vlc_object_hold call a few lines above. But I
> > assume
> > there is a reason why we hold it. My guess is that it would cause
> > to
> > crash if the input changes in the middle of an user interaction.
> Sorry for not answering this one. I didn't realize it was a question.
> I do think the vlc_object_hold in menus.cpp are not useful since a
> reference is already held to guarantee that the p_input variable keeps
> pointing to a valid address.
> As long as these methods are executed within the same qt4 thread that
> maintains the p_input variable, the input object will still be there,
> if a new one is started right in the middle of the user interaction.
> So, yes, I think we can simply remove vlc_object_hold everywhere in
Actually, I'm wrong. p_input is set up in a callback.
So vlc_object_hold are required but should be part of the getInput
And a lock mechanism should be used to protect p_input on both side (qt4
thread and thread running the callback)
More information about the vlc-devel