LinearAllocator::~LinearAllocator(void) { Page* p = m_pages; while (p) { Page* next = p->next(); delete p; RM_ALLOCATION(m_pageSize); p = next; } }
LinearAllocator::~LinearAllocator(void) { while (mDtorList) { auto node = mDtorList; mDtorList = node->next; node->dtor(node->addr); } Page* p = mPages; while (p) { Page* next = p->next(); p->~Page(); free(p); RM_ALLOCATION(); p = next; } }