On Thu, Jan 26, 2012 at 03:34, Ross Finlayson <finlay...@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; }
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel