Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-05-01 05:37:47 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-05-01 05:53:32 +0400
commit60c8c130fed60dc1fe5387b960549385188feadf (patch)
tree20a986e078ec4c79a321e3a2d12cb4a0d22b724c /source/gameengine/Physics
parent8d42e7b20d884937f7bf5491b0bddeec3e54b67b (diff)
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().
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 966afa0e7f2..3c9c5d0a239 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3200,8 +3200,6 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
{
delete motionstate;
shapeInfo->Release();
- if (parent)
- parent->Release();
return;
}
@@ -3254,8 +3252,6 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
shapeInfo->Release();
// delete motionstate as it's not used
delete motionstate;
- if (parent)
- parent->Release();
return;
}
@@ -3432,7 +3428,4 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
}
}
#endif
-
- if (parent)
- parent->Release();
}