[Live-devel] Closing and deleting enviroment at the shutdownstream [ testRTSPClient and OpenRTSPClient]
Ross Finlayson
finlayson at live555.com
Fri Jan 6 18:32:40 PST 2012
> I want to simply close and delete existing UsageEnvironment
The (one and only) way to do this is to call "reclaim()" on the "UsageEnvironment" object. However, as you noted, this will not actually delete the object if the "liveMediaPriv" pointer is non-NULL. That happens if you call "reclaim()" on the "UsageEnvironment" when some "Medium" objects still exist, and/or some socket(s) are still open. So, if you really want to reclaim the (minuscule) memory used by a "UsageEnvironment", then you need to first make sure that all "Medium" objects, and all sockets, have been closed.
But, if you've really finished all LIVE555-related computation, and want to reclaim all of its state, then *by far* the easiest/best way to do this is to put all of the LIVE555-related computation in its own process (i.e., application), and just have this application "exit()". (But apparently many modern-day developers don't understand processes :-)
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/20120106/6979634f/attachment.html>
More information about the live-devel
mailing list