[vlc-devel] RE : [PATCH] -- core(update.c) : correct object release misplaced and memory leaks

brezhoneg1 brezhoneg1 at yahoo.fr
Mon Aug 3 14:39:19 CEST 2009


:
> >
> > - a vlc_object_release misplaced
> >   The object cannot be released while the associated thread is still
> > running (assert failed)
> 
> You add a memory leak there.
> 
> The problem is that the job of releasing the object is given to the
> thread associated to this object (I can't think of another way to
> manage the thread which is downloading the updates)
> 
> There seems to be no problem with a thread destroying the object it is
> associated to (there is no crash if you remove this assertion).
> Perhaps the assertion could check if the running thread is the caller
> of vlc_object_destroy?
> 

Is there a real need to release the object as soon as the thread is
about to end ? If not released right away, it ends up being released
later on either
   - when a new download is called
   - when update_Delete is called

So I don't think there is a memory leak.

Also, in your case, the assertion failed means the vlc_thread_join has
never occurred, which may not be a crash but at least means another
memory leak. ... 

Regards
Erwan10


   





More information about the vlc-devel mailing list