[Live-devel] Memory leaks, only creatNew But no delete

Ross Finlayson finlayson at live555.com
Tue May 26 17:45:15 PDT 2009


>I searched all files of live555, found nowhere to delete the pointer 
>of BasicTaskScheduler instance, include playcommon.c . I don't know 
>whether I should delete it myself.
>But the destructor of class "BasicUsageEnvironment" is declared in
>protected field and cannot accessed by "delete". Should I move it to
>public field?

No, you do not need to modfify the existing code.

To delete a UsageEnvironment* "env", call
	env->reclaim();

To delete a TaskScheduler* "sched", call
	delete sched;

You should do this in the order listed above - i.e, delete the 
UsageEnvironment first, then the TaskScheduler.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090526/ad0a0ddb/attachment.html>


More information about the live-devel mailing list