[Live-devel] reclaiming/deleting objects

Ross Finlayson finlayson at live.com
Fri Nov 19 10:16:11 PST 2004


At 04:50 AM 11/19/04, you wrote:
>What's the appropriate method for tearing down the ENTIRE stream I've
>created, including unbinding from used ports, etc.?

If you're running a RTSP server, the simplest way is just to exit the 
entire process - i.e., using "exit(0)".  (If you're running a RTSP 
*client*, you should do a "teardown...()" on the stream first.)  But if you 
want to keep the process alive...

>UsageEnvironment::reclaim() doesn't appear to do this (although I might
>be using it wrong)

No, "UsageEnvironment::reclaim()" only deletes the "UsageEnvironment" 
object - and that should be called at the very end (after everything else 
has been deleted).

>, and there doesn't appear to be any method, for
>instance, to delete an RTSPServer object.

"Medium::close()" is the way to delete any 'liveMedia' object  (i.e., any 
subclass of "Medium", including "RTSPServer").

Most of the 'test programs' don't bother calling this.  Instead, they just 
call "exit(0)".  However, you can see an example of this at the end of 
"testWAVAudioStreamer.cpp".


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list