[Live-devel] memory leak
44072429
44072429 at qq.com
Tue Nov 2 18:03:40 PDT 2010
thank you.
and another question.
what about MediaSubSession::sessionId.
it was created was strDup.
and where to delete it.
the same to other strDup return variant.
------------------ Original ------------------
From: "Ross Finlayson"<finlayson at live555.com>;
Date: Tue, Nov 2, 2010 09:06 PM
To: "LIVE555 Streaming Media - development & use"<live-devel at ns.live555.com>;
Subject: Re: [Live-devel] memory leak
>m_pUsageEnvironment = BasicUsageEnvironment::createNew(*m_pTaskScheduler);
>if(m_pUsageEnvironment == NULL)
>{
>service_error.init(service_error_type_failed,"BasicUsageEnvironment::createNew failed");
>return service_error;
>}
>
>and . how to delete this m_pUsageEnvironment;
Objects of class "UsageEnvironment" (or subclasses) are deleted using
"UsageEnvironment::reclaim()", rather than "delete".
So, just call:
m_pUsageEnvironment->reclaim();
and then
delete m_pTaskScheduler;
Of course, you should do this only after you have deleted any "Media"
subclassed objects - using "Medium::close()".
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20101103/d453e2e4/attachment.html>
More information about the live-devel
mailing list