diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-10 00:42:03 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-10 00:42:03 +0300 |
commit | 822e51bd2d663f82d360d474192718660cc9a35c (patch) | |
tree | 524fb7a0d13fd702bce374a876a714f894ffcf68 /source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | |
parent | ce7a21047f50c0e26ce55134ba434543c247d894 (diff) |
BGE memleak fixed: mesh/material not deleted when switching scene
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 7b2c514db8a..465a021cd43 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -682,8 +682,6 @@ void KX_ConvertODEEngineObject(KX_GameObject* gameobj, #endif //WIN32 -static GEN_Map<GEN_HashedPtr,btCollisionShape*> map_gamemesh_to_bulletshape; - // forward declarations static btCollisionShape* CreateBulletShapeFromMesh(RAS_MeshObject* meshobj, bool polytope) { @@ -701,14 +699,6 @@ static btCollisionShape* CreateBulletShapeFromMesh(RAS_MeshObject* meshobj, bool int numPoints = 0; btVector3* points = 0; - btCollisionShape** shapeptr = map_gamemesh_to_bulletshape[GEN_HashedPtr(meshobj)]; - - // Mesh has already been converted: reuse - if (shapeptr) - { - //return *shapeptr; - } - // Mesh has no polygons! int numpolys = meshobj->NumPolygons(); if (!numpolys) @@ -850,7 +840,6 @@ static btCollisionShape* CreateBulletShapeFromMesh(RAS_MeshObject* meshobj, bool if (numvalidpolys > 0) { - //map_gamemesh_to_bulletshape.insert(GEN_HashedPtr(meshobj),collisionMeshShape); if (!polytope) { bool useQuantization = true; @@ -1200,17 +1189,6 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, void KX_ClearBulletSharedShapes() { - int numshapes = map_gamemesh_to_bulletshape.size(); - int i; - btCollisionShape*shape=0; - for (i=0;i<numshapes ;i++) - { - shape = *map_gamemesh_to_bulletshape.at(i); - //delete shape; - } - - map_gamemesh_to_bulletshape.clear(); - } #endif |