Merge pull request #1915 from WenlongLu/create_status

Fix a memory leak when removing collision shape
This commit is contained in:
erwincoumans
2018-10-02 12:18:32 -07:00
committed by GitHub

View File

@@ -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;