[Live-devel] memory leak in RTSPClient when SETUP is processed
Ross Finlayson
finlayson at live555.com
Fri Jan 27 13:06:52 PST 2012
> When the RTSPClient execute SETUP request, the sessionId is stored in the MediaSubSession.
And it gets delete[]d later, when the RTSPClient does a "TEARDOWN". So this isn't really a memory leak.
However, I can see why "valgrind" might get confused by this. The "sessionId" field in "MediaSubsession" is a bit strange, because it - unlike most class member fields - is not managed by the class's member functions and/or its constructor/destructor. Instead, it is managed by whatever code happens to use the "sessionId" field - in this case, the "RTSPClient" code. (Note that "MediaSession"s can be used without RTSP - e.g., if you want to receive a multicast stream using only its SDP description. So "sessionId" is not an inherent property of a "MediaSession".)
However, because you're at least the third 'valgrinerd' :-) to have asked about this over the years, I might end up changing this behavior, so I don't keep getting questions about this...
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/20120127/bec4a49f/attachment.html>
More information about the live-devel
mailing list