From 5441323dca30c169d1ecb726d26e8cb4c5f4994d Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sat, 23 May 2009 14:46:43 +0000 Subject: BGE: fix memleaks. SCA_RandomActuator: The random generator was shared between replicas and not deleted. Added ref counting between replicas to allow deletion at the end. KX_Camera: The scenegraph node was not deleted for temporary cameras (ImageMirror and shadow), causing 500 bytes leak per frame and per shadow light. KX_GameActuator: Global dictionary buffer was not deleted after saving. KX_MotionState: The motion state for compound child was not deleted KX_ReplaceMeshActuator: The mesh was unnecessarily converted for each actuator and not deleted, causing large memleak. After these fix, YoFrankie runs without memleak. --- source/gameengine/Rasterizer/RAS_IPolygonMaterial.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.h') diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h index decd93c3d13..e19db35ccb5 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h @@ -73,7 +73,7 @@ protected: int m_transp; bool m_alpha; bool m_zsort; - int m_lightlayer; + //int m_lightlayer; int m_materialindex; unsigned int m_polymatid; @@ -147,7 +147,7 @@ public: virtual bool Equals(const RAS_IPolyMaterial& lhs) const; bool Less(const RAS_IPolyMaterial& rhs) const; - int GetLightLayer() const; + //int GetLightLayer() const; bool IsAlpha() const; bool IsZSort() const; unsigned int hash() const; @@ -167,7 +167,7 @@ public: /* * PreCalculate texture gen */ - virtual void OnConstruction(){} + virtual void OnConstruction(int layer){} }; inline bool operator ==( const RAS_IPolyMaterial & rhs,const RAS_IPolyMaterial & lhs) -- cgit v1.2.3