diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-01 22:46:50 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-01 22:46:50 +0300 |
commit | 0db0f5734d358676b11eccc702cf02adb3174b7e (patch) | |
tree | dbed0e86663eeabe8d333892958310878bfbe533 /source/gameengine/Ketsji/KX_Scene.h | |
parent | 44314581dc934dc99c9504edf671118a9f988b68 (diff) |
Various mem leaks related to CValue reference count fixed
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 50fcf1a3c40..b857f4f591e 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -85,6 +85,7 @@ class RAS_IPolyMaterial; class RAS_IRasterizer; class RAS_IRenderTools; class SCA_JoystickManager; +class btCollisionShape; /** * The KX_Scene holds all data for an independent scene. It relates * KX_Objects to the specific objects in the modules. @@ -111,6 +112,7 @@ protected: CListValue* m_objectlist; CListValue* m_parentlist; // all 'root' parents CListValue* m_lightlist; + CListValue* m_inactivelist; // all objects that are not in the active layer /** * The tree of objects in the scene. @@ -121,7 +123,11 @@ protected: * The set of cameras for this scene */ list<class KX_Camera*> m_cameras; - + /** + * The set of bullet shapes that must be deleted at the end of the scene + * to avoid memory leak (not deleted by bullet because shape are shared between replicas) + */ + vector<class btCollisionShape*> m_shapes; /** * Various SCA managers used by the scene */ @@ -300,6 +306,7 @@ public: void NewRemoveObject(CValue* gameobj); void ReplaceMesh(CValue* gameobj, void* meshobj); + void AddShape(class btCollisionShape* shape); /** * @section Logic stuff * Initiate an update of the logic system. @@ -316,6 +323,10 @@ public: ); CListValue* + GetInactiveList( + ); + + CListValue* GetRootParentList( ); |