From 24f5b819cfb812c72d6f54eea551c5f6b5808617 Mon Sep 17 00:00:00 2001 From: Wenlong Lu Date: Tue, 2 Oct 2018 10:58:23 -0700 Subject: [PATCH] fix a memory leak --- examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index af9dbadd9..406476668 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -8577,6 +8577,7 @@ bool PhysicsServerCommandProcessor::processRemoveBodyCommand(const struct Shared { btMultiBodyWorldImporter* importer = m_data->m_worldImporters[foundIndex]; m_data->m_worldImporters.removeAtIndex(foundIndex); + importer->deleteAllData(); delete importer; m_data->m_userCollisionShapeHandles.freeHandle(removeCollisionShapeId); serverCmd.m_type = CMD_REMOVE_BODY_COMPLETED;