// ------------------------------------------------------------------------------------------------------- Bool AllocatorMT::Free( void* ptr ) { UInt32 threadID = (UInt32)GetCurrentThreadId(); MemPool* pool = FindPool(threadID); A_ASSERT(pool != 0, "Try to free a pointer which not in this thread!"); return pool->Free(ptr); }
void XMLNode::DeleteNode(XMLNode* node) { if (node == 0) { return; } MemPool* pool = node->_memPool; node->~XMLNode(); pool->Free(node); }
void XMLElement::DeleteAttribute(XMLAttribute* attribute) { if (attribute == 0) { return; } MemPool* pool = attribute->_memPool; attribute->~XMLAttribute(); pool->Free(attribute); }