CContactCache* CContactCache::getContactCache(const HANDLE hContact) { CContactCache *c = m_cCache, *cTemp; cTemp = c; while(c) { cTemp = c; if(c->m_hContact == hContact) { c->inc(); return(c); } c = c->m_next; } CContactCache* _c = new CContactCache(hContact); if(cTemp) { cTemp->m_next = _c; return(_c); } m_cCache = _c; return(_c); }