<DIV style="FONT-SIZE: 12px; FONT-FAMILY: verdana, arial">
<DIV>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">Hi ross,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">I have a little problem when my application is ending, not all the memory is unallocated.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">After exiting the doEventLoop, I close RTSPServer using Medium::close(rtspServer).<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">Then RTSPServer::close(rtspServer); delete the ServerMediaSession and the ServerMediaSubsession but does not call Medium::close for other medium than RTSPServer.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">So when I try to delete the environment then env->reclaim(); does not delete itself. Because the public void* UsageEnvironment::liveMediaPriv member is not NULL.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">What is the way to follow?<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">The Following is my main code part:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">RTSPServer* rtspServer;<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">UsageEnvironment* env;<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">TaskScheduler* scheduler;<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">//derive from BasicTaskScheduler<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">schedule = OperaTaskScheduler::createNew(); <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">env = BasicUsageEnvironment::createNew(*scheduler);<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">rtspServer = RTSPServer::createNew(*env);<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">ServerMediaSession* sms<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New"><SPAN style="mso-spacerun: yes"> </SPAN>= ServerMediaSession::createNew(*env, NULL, inputFileName,<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New"><SPAN style="mso-tab-count: 2"> </SPAN><SPAN style="mso-tab-count: 4"> </SPAN>"Session streamed by \"audioStreamer\"", <SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>isSSM);<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">//derive from OperaPassiveServerMediaSubsession<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">sms->addSubsession(OperaLiveServerMediaSubsession:: createNew(*env, <SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN>inputFileName, true /* reusefirst*/, false, NULL));<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">rtspServer->addServerMediaSession(sms);<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">env->taskScheduler().doEventLoop(); // return on a specific windoze event<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">Medium::close(rtspServer); <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">env->reclaim(); //does not perform 'delete this'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><FONT size=2><FONT face="Courier New">delete scheduler;<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P>
<P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: black; mso-ansi-language: EN-US"><o:p><FONT face="Courier New" size=2> </FONT></o:p></SPAN></P></DIV></DIV><DIV style='{font-family:verdana, arial;font-size: 10px}'>
<DIV><br></DIV>
<DIV><br></DIV>
<DIV><EM>Accédez au courrier électronique de La Poste : www.laposte.net ;</EM></DIV>
<DIV><EM>3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)</EM></DIV>
</DIV>