[Live-devel] Closing the media does not free allocated memory?

Ross Finlayson finlayson at live555.com
Thu Jul 23 03:48:56 PDT 2009


>How do I release memory allocated for ourClient since destructor is 
>private operation.

To reclaim an object derived from the "Medium" class, call 
"Medium::close()".  That is sufficient.

In general, you should reclaim objects in the reverse order that they 
were created.  So, to reclaim your "UsageEnvironment" and 
"TashScheduler" objects, do the following (after reclaiming other 
objects):

env->reclaim();
delete scheduler;

(Yes, this is all really ugly and inconsistent.  Someday it might get 
improved...)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090723/f3a88f13/attachment.html>


More information about the live-devel mailing list