BGE cleanup: KX_GameObject::GetParent() no longer increases the object's refcount.
authorMitchell Stokes <mogurijin@gmail.com>
Thu, 1 May 2014 01:37:47 +0000 (18:37 -0700)
committerMitchell Stokes <mogurijin@gmail.com>
Thu, 1 May 2014 01:53:32 +0000 (18:53 -0700)
commit60c8c130fed60dc1fe5387b960549385188feadf
tree20a986e078ec4c79a321e3a2d12cb4a0d22b724c
parent8d42e7b20d884937f7bf5491b0bddeec3e54b67b
BGE cleanup: KX_GameObject::GetParent() no longer increases the object's refcount.

I'm not sure why this function ever increased the object's refcount. Any
place in the code that calls KX_GameObject::GetParent() has to turn
around and call parent->Release(). Forgetting to call Release() was a
common cause of memory leaks (in fact, KX_SteeringActuator was probably
leaking). If the refcount needs to be increased, the calling code can
handle calling AddRef().
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp