Re: [Live-devel] RTSPClient::fBaseURL and RTSPClient::sessHi Ross,

Many thanks for getting back.

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 be triggered only for tho short time and right after 
receiving such events. The rest of time application should be idle. Thus, it 
will not exit immediatelly after ending a single RTSP session, of course.

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 indefinitely many times during application run-time 
might lead to significant memory leaks... Is there any workaround?

Kind regards,
Dmitriy
  ----- Original Message ----- 
  From: Ross Finlayson 
  To: LIVE555 Streaming Media - development & use 
  Sent: Friday, December 03, 2010 4:24 PM
  Subject: Re: [Live-devel] RTSPClient::fBaseURL and RTSPClient::sessionURL()


    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.


  Alternatively, you could subclass "RTSPClient", and store your information in 
fields in the subclass.



     I have another question. Do I need to delete RTSPClient objects myself (as 
well as UsageEnvironment and TaskScheduler)?


  Yes, unless, of course, you will be exiting the application anyway (as 
"openRTSP" does when it finishes).


     The openRTSP application does not show how to do this properly.

  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):


  Medium::close(rtspClient);
  env->reclaim();
  delete scheduler;


  (Yes, this is all really ugly and inconsistent.  Someday it might get 
improved...)
-- 

  Ross Finlayson
  Live Networks, Inc.
  http://www.live555.com/


------------------------------------------------------------------------------


  _______________________________________________
  live-devel mailing list
  live-devel@lists.live555.com
  http://lists.live555.com/mailman/listinfo/live-devel
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to