[Live-devel] memory management
Erwin Rol
mailinglists at erwinrol.com
Fri Feb 24 14:11:09 PST 2006
On Fri, 2006-02-24 at 04:20 -0800, Ross Finlayson wrote:
> Every object that was created by "play()" is reclaimed by "afterPlaying()".
>
> Note that classes - like the various *Framer* classes - that are
> derived from "FramedFilter", automatically reclaim their source
> object when they, themselves are reclaimed. (See
> "FramedFilter::~FramedFilter()".)
So the object returned by the create* methods get ownership of the
objects that are passed to the create* method as parameter.
for example;
fileSource = ByteStreamFileSource::createNew(*env, inputFileName);
mpegDemux = MPEG1or2Demux::createNew(*env, fileSource);
Now mpegDemux owns fileSource, and when mpegDemux is destroyed
fileSource is also destroyed ?
And the Medium::close(mpegDemux); destroys the mpegDemux object (and
than also fileSource) right ?
It would be nice if API info like that would be part of the
documentation case;
http://www.live555.com/liveMedia/doxygen/html/classByteStreamFileSource.html#ByteStreamFileSourcee0
doesn't say much :-) The only thing i can see there is that a object
created with new is returned, which makes me think it needs to be
deleted somewhere.
- Erwin
More information about the live-devel
mailing list