<DIV>thank you.</DIV>
<DIV>and another question.</DIV>
<DIV>what about MediaSubSession::sessionId.</DIV>
<DIV>it was created was strDup.</DIV>
<DIV>and where to delete it.</DIV>
<DIV>the same to other strDup return variant.</DIV>
<DIV><includetail>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------&nbsp;Original&nbsp;------------------</DIV>
<DIV style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>From: </B>&nbsp;"Ross Finlayson"&lt;finlayson@live555.com&gt;;</DIV>
<DIV><B>Date: </B>&nbsp;Tue, Nov 2, 2010 09:06 PM</DIV>
<DIV><B>To: </B>&nbsp;"LIVE555 Streaming Media - development &amp; use"&lt;live-devel@ns.live555.com&gt;; <WBR></DIV>
<DIV></DIV>
<DIV><B>Subject: </B>&nbsp;Re: [Live-devel] memory leak</DIV></DIV>
<DIV>&nbsp;</DIV>&gt;m_pUsageEnvironment = BasicUsageEnvironment::createNew(*m_pTaskScheduler);<BR>&gt;if(m_pUsageEnvironment == NULL)<BR>&gt;{<BR>&gt;service_error.init(service_error_type_failed,"BasicUsageEnvironment::createNew failed");<BR>&gt;return service_error;<BR>&gt;}<BR>&gt;<BR>&gt;and . how to delete this m_pUsageEnvironment;<BR><BR>Objects of class "UsageEnvironment" (or subclasses) are deleted using <BR>"UsageEnvironment::reclaim()", rather than "delete".<BR><BR>So, just call:<BR>m_pUsageEnvironment-&gt;reclaim();<BR>and then<BR>delete m_pTaskScheduler;<BR><BR>Of course, you should do this only after you have deleted any "Media" <BR>subclassed objects - using "Medium::close()".<BR>-- <BR><BR>Ross Finlayson<BR>Live Networks, Inc.<BR>http://www.live555.com/<BR>_______________________________________________<BR>live-devel mailing list<BR>live-devel@lists.live555.com<BR>http://lists.live555.com/mailman/listinfo/live-devel<BR></DIV></includetail></DIV>