[Live-devel] Undereferenced sessions

Ross Finlayson finlayson at live555.com
Mon Apr 9 11:07:52 PDT 2007


>In ServerMediaSession, fDeleteWhenUnreferenced is always False and there
>is no way to set it True. This means that in
>RTSPServer::RTSPClientSession::~RTSPClientSession()
>
>if (fOurServerMediaSession->referenceCount() == 0
>	&& fOurServerMediaSession->deleteWhenUnreferenced())
>
>is awlays false and current session is never freed, or i miss something.

Yes, you missed that it's set to true in 
"RTSPServer::removeServerMediaSession()", if the "ServerMediaSession" 
object is currently in use (i.e., currently has clients).

>I extend ServerMediaSession class with my own and log new and delete and
>   i see new allocations but never see destructor is being called.

"ServerMediaSession" objects are removed/deleted as a result of 
"RTSPServer::removeServerMediaSession()" being called.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list