>> My ptable pointer allocated in MediaLookupTable::ourMedia but never deleted
>> No, that's incorrect - it *will* get deleted, if/when all "Medium" objects 
>> end
> up getting deleted (so there's no memory leak here).
> 
> Both VLD (visual leak detector) and ms crt debug runtime reports leaks in that
> code.

Once again, this table will get deleted if (and only if) all "Medium" objects 
get deleted.  (Recall that "Medium" objects are deleted by calling 
"Medium::close()".)


> BTW, i also interested in removing UsageEnvironment object too. In the sample
> code you are advised termination code looks like this:
> 
> pliveenvironment->reclaim();
> delete m_plivetaskscheduller;

That's correct.  Note that the call to "UsageEnvironment::reclaim()" will 
reclaim all allocated memory, but *only if* all "Medium" objects have already 
been deleted.

But the best/easiest way to reclaim all of the memory for all of the 
LIVE555-allocated objects is simply to call "exit(0)" - i.e., by exiting the 
entire process.  (But I forget - this is the 21st century.  For some odd 
reason, software developers now have forgotten how to structure their 
applications using multiple processes :-)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to