Thank you so much for your quick reply.  I'm always amazed on how quickly you 
get back to this list!  OTOH, I apologize for how late it took me to get back 
to your response.

I could not figure out why my liveMediaPriv was never null on TCP streams.  
Even tried directly on an IP camera's RTSP in case I was doing something screwy 
with the RTSP server...but with no luck.

I ended up writing a hack on my cleanup code that you may scold me on =)

auto tables = static_cast<_Tables*>(basicUsageEnvironment->liveMediaPriv);

if(tables)
{
    auto socketTable = static_cast<HashTable*>(tables->socketTable);

    if(socketTable && socketTable->IsEmpty())
    {
        delete socketTable;
        tables->socketTable = nullptr;
        tables->reclaimIfPossible();
    }
}

basicUsageEnvironment->reclaim();

In my case, the socketTable->IsEmpty() is seems to be always true and 
everything seems to be deleted and free'd ok.  I'm not sure if this hack gives 
any further clues into what I'm doing incorrect or not.

Anyways, on your other point.  Yes the OS is the best garbage collector out 
there =), but in this case, the RTSP client code is in a GUI on Windows and 
architecturally made sense to have it in the same process.

Thanks again for all your great help.  I've learned so much just subscribing to 
the list.

-Jer
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to