[Bf-blender-cvs] [cdc5d65] master: BGE: Fixing a memory leak from the recent physics changes.
Mitchell Stokes
noreply at git.blender.org
Wed Apr 30 08:53:58 CEST 2014
Commit: cdc5d6537f09bceccbfaa0273bfc72696960c305
Author: Mitchell Stokes
Date: Tue Apr 29 23:53:10 2014 -0700
https://developer.blender.org/rBcdc5d6537f09bceccbfaa0273bfc72696960c305
BGE: Fixing a memory leak from the recent physics changes.
===================================================================
M source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
===================================================================
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 3c9c5d0..966afa0 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3200,6 +3200,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
{
delete motionstate;
shapeInfo->Release();
+ if (parent)
+ parent->Release();
return;
}
@@ -3252,6 +3254,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
shapeInfo->Release();
// delete motionstate as it's not used
delete motionstate;
+ if (parent)
+ parent->Release();
return;
}
@@ -3428,4 +3432,7 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
}
}
#endif
+
+ if (parent)
+ parent->Release();
}
More information about the Bf-blender-cvs
mailing list