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().
This commit is contained in:
Mitchell Stokes
2014-04-30 18:37:47 -07:00
parent 8d42e7b20d
commit 60c8c130fe
8 changed files with 0 additions and 28 deletions

View File

@@ -265,9 +265,6 @@ bool KX_RaySensor::Evaluate()
if (!spc && parent)
spc = parent->GetPhysicsController();
if (parent)
parent->Release();
PHY_IPhysicsEnvironment* physics_environment = this->m_scene->GetPhysicsEnvironment();