[Live-devel] Closing the media does not free allocated memory?

Dario dmaljur at elma.hr
Fri Jul 24 01:03:37 PDT 2009


So, I can't free memory allocated by RTSPClient::createNew?I have a wrapper class around RTSPClient which I use in mannner ofCRTSPClient *client = new CRTSPClient(...).And I should not use "delete client;" but internally close open Media and then just reuse "*client" without deleting it?I'm just curious, why did live555 team decided to do it that way.Isn't it easier just to use standard new and delete for allocation? (not a factory)>To reclaim an object derived from the "Medium" class, call 
>"Medium::close()".  That is sufficient.

>In general, you should reclaim objects in the reverse order that they 
>were created.  So, to reclaim your "UsageEnvironment" and 
>"TashScheduler" objects, do the following (after reclaiming other 
>objects):

>env->reclaim();
>delete scheduler;

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


ELMA Kurtalj d.o.o. (ELMA Kurtalj ltd.)
Vitezićeva 1a, 10000 Zagreb, Hrvatska (Viteziceva 1a, 10000 Zagreb, Croatia)
Tel: 01/3035555, Faks: 01/3035599 (Tel: ++385-1-3035555, Fax: ++385-1-3035599 )

Www:
www.elma.hr; shop.elma.hr

E-mail:
elma at elma.hr (elma at elma.hr)
pitanje at elma.hr (questions at elma.hr)
primjedbe at elma.hr (complaints at elma.hr)
prodaja at elma.hr (sales at elma.hr)
servis at elma.hr (servicing at elma.hr)
shop at elma.hr (shop at elma.hr)
skladiste at elma.hr (warehouse at elma.hr)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090724/7093d62e/attachment.html>


More information about the live-devel mailing list