[Live-devel] Proper cleanup of live555 instances
Silvain Beriault
silvain.beriault at larus.com
Thu Jul 3 13:09:04 PDT 2008
Hello,
I have written an application similar to testMPEG1or2VideoStreamer.cpp
but within a larger application. Therefore, I need to perform some
cleanup to avoid memory leaks.
Here is what I currently allocate (in that same order):
TaskScheduler *scheduler;
BasicUsageEnvironment *env;
RTPSink *sink;
RTCPInstance *rtcp;
FramedSource *framedSource;
here is currently how I currently cleanup:
sink->stopPlaying();
Medium::close(framedSource);
Medium::close(sink); <== crashes
env->reclaim();
Here are my questions:
1. Overall what should be the full cleanup sequence for that example?
2. Do I need to "delete scheduler" or env->reclaim() does that
3. Why Medium::close(sink) crashes? (is it already being cleaned up by
Medium::close(framedSource) ?)
4. How to cleanup RTCPInstance ?
Thank you
Silvain
More information about the live-devel
mailing list