[matroska-devel] Re: Memory leaks in libmatroska partially fixed

Cyrius suiryc at yahoo.com
Sun Feb 23 14:56:24 CET 2003


--- Christian HJ Wiesner <chris at matroska.org> wrote:
> 
> 
> Hi,
> 
> Cyrius found the main reason for the mem leaks in
> libmatroska. He will 
> be the better one to explain what Steve has screwed
> ( ;-) ), i hardly 
> understand it. I hope he will upload his changes to
> CVS soon, in any 
> case a newer version of matroskdub with an improved
> library was uploaded 
> to here :
> 
>
http://cyrius.bunkus.org/VirtualDubMod-Matroska-Alpha2.rar
> 
> Regards
> 
> Christian
> 
> http://www.matroska.org

lol
Well the problem is due to the fact that currently
almost none of the Ebml elements is freed in the
library (robUx4 will add some nice ways to do this
later).
However to try save some memory he already added a
method to free allocated frames in the KaxBlock
object. What he forgot is that when writing/reading
with this element he copies all the data in a linear
buffer (frames by themselves are stored in a list of
buffers) that is used by the EbmlBinary (base class of
KaxBlock), and of course this buffer wasn't freed ;)

Unfortunately I don't think it would be a good idea to
commit this now because I had to add some functions (a
way to free children in EbmlMaster, default destructor
in some classes to free allocated memory, ...) which
would conflict with the freeing elements that robUx4
will add.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
http://www.matroska.org



More information about the Matroska-devel mailing list