<div dir="ltr"><br><div class="gmail_quote">On Thu, Jan 26, 2012 at 03:34, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">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.<div>
<br></div><div><br></div><div><div class="im"><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>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.</div>
</div></div></div></div></div></blockquote><div><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><br></div></div></div></div></div></div></div></div><div>I presume that you want to call</div>
<div><span style="white-space:pre-wrap">  MediaLookupTable</span>::<span style="white-space:pre-wrap">ourMedia(</span>*env);</div><div>to check whether its value is NULL or not.  But you can already check the value of</div>
<div><span style="white-space:pre-wrap">  </span>env->liveMediaPriv</div><div>and </div><div><span style="white-space:pre-wrap">        </span>env->groupsockPriv</div><div>which will give you the same information, without requiring any change to the supplied code.</div>
<span class="HOEnZb"><font color="#888888"><br><br></font></span></div></div></blockquote><div><br></div><div>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</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>if (m_pEnv) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>if(_Tables* pTables = _Tables::getOurTables(*m_pEnv, False)) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                      </span>if(MediaLookupTable* pMediaTable = (MediaLookupTable*) pTables->mediaTable) {</div><div><span class="Apple-tab-span" style="white-space:pre">                             </span>HashTable::Iterator* it = HashTable::Iterator::create(pMediaTable->getTable());</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>const char* name = NULL;</div><div><span class="Apple-tab-span" style="white-space:pre">                             </span>while(Medium* medium = (Medium*) it->next(name)) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                      </span>RAYVLOG_PUBLIC_ERROR(s, GUI_LOG, s << "memory leak: object " << name << " of type " << typeid(*medium).name());</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>delete it;</div><div><span class="Apple-tab-span" style="white-space:pre">                   </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre">              </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">           </span>m_pEnv->reclaim();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pEnv = 0;</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>} </div></div>
</div>