[Live-devel] memory management
Erwin Rol
mailinglists at erwinrol.com
Fri Feb 24 12:47:36 PST 2006
I have a question about memory management, when i look at a random test*
program i never see objects being deleted. Like the code below loops
endlessly because in the afterPlay() play() is called again.
In play() fileSource is recreated everytime, but it is never deleted.
the same for audioSource and audioES. Does the library automagically
delete these objects, or is that a true memory leak in the test
programs ?
........
play();
env->taskScheduler().doEventLoop(); // does not return
return 0; // only to prevent compiler warning
}
void afterPlaying(void* clientData) {
........
Medium::close(audioSource);
.......
play();
}
void play() {
..........
// Open the input file as a 'byte-stream file source':
ByteStreamFileSource* fileSource
= ByteStreamFileSource::createNew(*env, inputFileName);
FramedSource* audioES = mpegDemux->newAudioStream();
audioSource
= MPEG1or2AudioStreamFramer::createNew(*env, audioES);
.........
}
More information about the live-devel
mailing list