GUIContainer::~GUIContainer() { for( uint32_t Idx = 0; Idx < array::size( mSubContainers ); ++Idx ) { MAKE_DELETE( memory_globals::default_allocator(), GUIContainer, mSubContainers[Idx] ); } }
Actor::~Actor() { for( int32_t Idx = array::size( mComponents ) - 1; Idx >= 0; --Idx ) { Component* Comp = mComponents[Idx]; DeattachComponent( Comp ); // @TODO: Make a better way to deallocate components MAKE_DELETE( memory_globals::default_allocator(), Component, Comp ); } }
void close(ResourceDataSource *dataSource) { std::lock_guard<std::recursive_mutex> lock(m_lock); auto found = m_sources.find(dataSource); if (found != m_sources.end()) { MAKE_DELETE(MemoryManager::allocDefault(), *found); m_sources.erase(found); } else DFLOG_WARN("Failed to close resource data source"); }