<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: [Live-devel] RTSPClient::fBaseURL and RTSPClient::sess</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>BLOCKQUOTE {
PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
DL {
PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
UL {
PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
OL {
PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
LI {
PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
</STYLE>
<META content="MSHTML 6.00.6000.17092" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Ross,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Many thanks for getting back.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>A short word about application I'm writing.
It is intended to run for indefinitely long time, until the end user
shuts it down manually. Most of time it is going to be awaiting for some
specific events from the real world (such as motion detectors and radionuclide
detectors). The setting up and recording new RTSP session should </FONT><FONT
face=Arial size=2>be triggered only for tho short time and right after
receiving such events. The rest of time application should be idle.
Thus, it will </FONT><FONT face=Arial size=2>not exit immediatelly after
ending a single RTSP session, of course.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With this in mind I was wondering if
Medium::close(rtspClient) is enough to reclaim RTSPClient objects? It
seems this function doesn't release object's memory. It only removes
object from MediaLookupTable. At least from the first glance. If so, doing this
</FONT><FONT face=Arial size=2>indefinitely many times during application
run-time might lead to significant memory leaks... Is there any
workaround?</FONT></DIV>
<DIV><FONT><FONT face=Arial></FONT> </DIV></FONT>
<DIV><FONT face=Arial size=2>Kind regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Dmitriy</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=finlayson@live555.com href="mailto:finlayson@live555.com">Ross
Finlayson</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=live-devel@ns.live555.com
href="mailto:live-devel@ns.live555.com">LIVE555 Streaming Media - development
& use</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, December 03, 2010 4:24
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Live-devel]
RTSPClient::fBaseURL and RTSPClient::sessionURL()</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<BLOCKQUOTE cite="" type="cite"><FONT face=Arial size=-1>Using separate
RTSPClient objects - that's exacty I'm going to do. Ok, seems I
have found a solution: RTSPClient class is derived from Medium class and
there is Medium::name() available which returns unique
value.</FONT></BLOCKQUOTE>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>Alternatively, you could subclass "RTSPClient", and store your
information in fields in the subclass.<BR></DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<BLOCKQUOTE cite="" type="cite"> <FONT face=Arial size=-1>I have
another question. Do I need to delete RTSPClient objects myself (as well as
UsageEnvironment and TaskScheduler)?</FONT></BLOCKQUOTE>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>Yes, unless, of course, you will be exiting the application anyway (as
"openRTSP" does when it finishes).</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<BLOCKQUOTE cite="" type="cite"><FONT face=Arial size=-1> The openRTSP
application does not show how to do this
properly.</FONT></BLOCKQUOTE>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR>In general, you should reclaim objects in the
reverse order that they were created. So, to reclaim your "RTSPClient",
"UsageEnvironment" and "TashScheduler" objects, do the following (after
reclaiming other objects):</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>Medium::close(rtspClient);</DIV>
<DIV>env->reclaim();</DIV>
<DIV>delete scheduler;</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>(Yes, this is all really ugly and inconsistent. Someday it might
get improved...)</DIV><X-SIGSEP><PRE>--
</PRE></X-SIGSEP>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR>Ross
Finlayson<BR>Live Networks, Inc.<BR>http://www.live555.com/</DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>live-devel mailing
list<BR>live-devel@lists.live555.com<BR>http://lists.live555.com/mailman/listinfo/live-devel<BR></BLOCKQUOTE></BODY></HTML>