Delete all SOLID shapes at the end of the game engine. They were all being leaked!
This commit is contained in:
@@ -117,6 +117,8 @@ KX_BlenderSceneConverter::~KX_BlenderSceneConverter()
|
||||
delete (*itm);
|
||||
itm++;
|
||||
}
|
||||
|
||||
KX_ClearSumoSharedShapes();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -108,6 +108,8 @@ void KX_ConvertSumoObject( class KX_GameObject* gameobj,
|
||||
struct PHY_ShapeProps* shapeprops,
|
||||
struct PHY_MaterialProps* smmaterial,
|
||||
struct KX_ObjectProperties* objprop);
|
||||
|
||||
void KX_ClearSumoSharedShapes();
|
||||
#endif
|
||||
|
||||
#endif //KX_CONVERTPHYSICSOBJECTS
|
||||
|
@@ -77,7 +77,7 @@
|
||||
|
||||
#include "KX_SumoPhysicsController.h"
|
||||
|
||||
GEN_Map<GEN_HashedPtr,DT_ShapeHandle> map_gamemesh_to_sumoshape;
|
||||
static GEN_Map<GEN_HashedPtr,DT_ShapeHandle> map_gamemesh_to_sumoshape;
|
||||
|
||||
// forward declarations
|
||||
void BL_RegisterSumoObject(KX_GameObject* gameobj,class SM_Scene* sumoScene,class SM_Object* sumoObj,const STR_String& matname,bool isDynamic,bool isActor);
|
||||
|
@@ -46,6 +46,7 @@ SM_FhObject::SM_FhObject(DT_ShapeHandle rayshape, MT_Vector3 ray, SM_Object *par
|
||||
|
||||
SM_FhObject::~SM_FhObject()
|
||||
{
|
||||
DT_DeleteShape(getShapeHandle());
|
||||
}
|
||||
|
||||
DT_Bool SM_FhObject::ray_hit(void *client_data,
|
||||
|
Reference in New Issue
Block a user