void BeforeCoreSystemsShutdown() override { // make sure that no textures are continue to be streamed in while the engine shuts down ezResourceManager::EngineAboutToShutdown(); ezRenderContext::DeleteConstantBufferStorage(m_hSampleConstants); m_hSampleConstants.Invalidate(); m_pDevice->DestroyTexture(m_hDepthStencilTexture); m_hDepthStencilTexture.Invalidate(); m_hMaterial.Invalidate(); m_hQuadMeshBuffer.Invalidate(); // tell the engine that we are about to destroy window and graphics device, // and that it therefore needs to cleanup anything that depends on that ezStartup::ShutdownHighLevelSystems(); m_pDevice->DestroyRasterizerState(m_hRasterizerState); m_pDevice->DestroyDepthStencilState(m_hDepthStencilState); // now we can destroy the graphics device m_pDevice->Shutdown(); EZ_DEFAULT_DELETE(m_pDevice); // finally destroy the window m_pWindow->Destroy(); EZ_DEFAULT_DELETE(m_pWindow); }
FolderType::~FolderType() { for (ezUInt32 i = 0; i < m_Readers.GetCount(); ++i) EZ_DEFAULT_DELETE(m_Readers[i]); for (ezUInt32 i = 0; i < m_Writers.GetCount(); ++i) EZ_DEFAULT_DELETE(m_Writers[i]); }
Mesh::~Mesh() { for (auto it = m_VertexDataStreams.GetIterator(); it.IsValid(); ++it) { EZ_DEFAULT_DELETE(it.Value()); } }
void ezVisualizerAdapterRegistry::ClearAdapters(const ezDocument* pDocument) { for (auto& adapt : m_DocumentAdapters[pDocument].m_Adapters) { EZ_DEFAULT_DELETE(adapt); } m_DocumentAdapters[pDocument].m_Adapters.Clear(); }
ezDataDirectoryType* FolderType::Factory(const char* szDataDirectory) { FolderType* pDataDir = EZ_DEFAULT_NEW(FolderType); if (pDataDir->InitializeDataDirectory(szDataDirectory) == EZ_SUCCESS) return pDataDir; EZ_DEFAULT_DELETE(pDataDir); return NULL; }
void FolderType::RemoveDataDirectory() { for (ezUInt32 i = 0; i < m_Readers.GetCount(); ++i) { EZ_ASSERT(!m_Readers[i]->m_bIsInUse, "Cannot remove a data directory while there are still files open in it."); } for (ezUInt32 i = 0; i < m_Writers.GetCount(); ++i) { EZ_ASSERT(!m_Writers[i]->m_bIsInUse, "Cannot remove a data directory while there are still files open in it."); } FolderType* pThis = this; EZ_DEFAULT_DELETE(pThis); }
void ezVariant::Release() { if (m_bIsShared) { if (m_Data.shared->m_uiRef.Decrement() == 0) { EZ_DEFAULT_DELETE(m_Data.shared); } } else if (IsValid()) { DestructFunc destructFunc; destructFunc.m_pThis = this; DispatchTo(destructFunc, GetType()); } }
Scene::~Scene(void) { EZ_DEFAULT_DELETE(m_pVoxelTerrain); EZ_DEFAULT_DELETE(m_pBackground); }
Level::~Level() { EZ_DEFAULT_DELETE(m_pWorld); }
void ezInputManager::DeallocateInternals() { EZ_DEFAULT_DELETE(s_pData); }
void ezReloadableVariableBase::Shutdown() { EZ_DEFAULT_DELETE(s_StoredVariables); s_StoredVariables = NULL; }