This leads to ugly memory leaks.Code:m_vRenderObjects.push_back(new Objects(mOperatorMesh)); /// this is never called ~Objects(void) { OutputDebugStringA("Cleanup Objects\n"); if (StateMachine != NULL) { delete StateMachine; StateMachine = NULL; } if (m_pAnimCtrl != NULL) { m_pAnimCtrl->Release(); m_pAnimCtrl = NULL; } dtFreeNavMeshQuery(m_navQuery); m_navQuery = NULL; }
Help please.
Thanks
Jack




Reply With Quote