MultiLineObj::~MultiLineObj() { #ifdef LEAKCHECK _leakchecker->destroy(); #endif if (_ulist) { UList* head = _pts_by_n[count()]; head->Remove(_ulist); delete _ulist; delete _x; delete _y; } else if (_pts_made) { delete _x; delete _y; } }
void UHashTable::Unregister (void* key) { int n = Hash(key); UList* slot = _slot[n]; if (slot != nil) { for (UList* u = slot->First(); u != slot->End(); u = u->Next()) { UHashElem* elem = Elem(u); if (Equal(elem->GetKey(), key)) { slot->Remove(u); delete elem; delete u; if (_slot[n]->IsEmpty()) { delete _slot[n]; _slot[n] = nil; } break; } } } }