[vlc-devel] RE : [PATCH] -- more small patches for Linux and qt4

brezhoneg1 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
qt4
> 
> > > Patch3: missing vlc_object_release in qt4 menu.cpp
> > > ---------------------------------------------------
> >
> > This seems wrong. If there really is a systemic reference leak, then
we
> > should
> > simply remove the vlc_object_hold call a few lines above. But I
would
> > assume
> > there is a reason why we hold it. My guess is that it would cause
the
> menu
> > 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,
even
> 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
> menus.cpp
> 
> Erwan10
> 
> 

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
function
And a lock mechanism should be used to protect p_input on both side (qt4
thread and thread running the callback)

Erwan10





More information about the vlc-devel mailing list