[Live-devel] Fwd: patch for live555 lib

aviad rozenhek aviadr1 at gmail.com
Thu Jan 26 05:01:21 PST 2012


On Thu, Jan 26, 2012 at 03:34, Ross Finlayson <finlayson at live555.com> wrote:

> No, because the "MediaLookupTable" class is used only internally within
> "Media.cpp", and is not intended to be use outside this implementation, I
> don't want to expose it outside that file.
>
>
> this enables me to check that all the lookup tables are empty when calling
> reclaim() on the usage environment, to make sure there are no memory leaks
> in my code.
>
>
> I presume that you want to call
> MediaLookupTable::ourMedia(*env);
> to check whether its value is NULL or not.  But you can already check the
> value of
> env->liveMediaPriv
> and
> env->groupsockPriv
> which will give you the same information, without requiring any change to
> the supplied code.
>
>
>
actually, I'm going through the tables to print out which of the objects
have leaked so I can debug my code. I need MediaLookupTable in an .h file
for that

if (m_pEnv) {
if(_Tables* pTables = _Tables::getOurTables(*m_pEnv, False)) {
if(MediaLookupTable* pMediaTable = (MediaLookupTable*) pTables->mediaTable)
{
HashTable::Iterator* it =
HashTable::Iterator::create(pMediaTable->getTable());
const char* name = NULL;
while(Medium* medium = (Medium*) it->next(name)) {
RAYVLOG_PUBLIC_ERROR(s, GUI_LOG, s << "memory leak: object " << name << "
of type " << typeid(*medium).name());
}
delete it;
}
}

m_pEnv->reclaim();
m_pEnv = 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120126/6abee631/attachment.html>


More information about the live-devel mailing list