<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> </DIV>
<DIV> </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">------------------ Original ------------------</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> "Ross Finlayson"<finlayson@live555.com>;</DIV>
<DIV><B>Date: </B> Tue, Nov 2, 2010 09:06 PM</DIV>
<DIV><B>To: </B> "LIVE555 Streaming Media - development & use"<live-devel@ns.live555.com>; <WBR></DIV>
<DIV></DIV>
<DIV><B>Subject: </B> Re: [Live-devel] memory leak</DIV></DIV>
<DIV> </DIV>>m_pUsageEnvironment = BasicUsageEnvironment::createNew(*m_pTaskScheduler);<BR>>if(m_pUsageEnvironment == NULL)<BR>>{<BR>>service_error.init(service_error_type_failed,"BasicUsageEnvironment::createNew failed");<BR>>return service_error;<BR>>}<BR>><BR>>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->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>