Fixed memory leak in LOD node.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8020 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-03-21 22:38:42 +00:00
parent 1ba3e60baa
commit fa512b8010

View File

@ -25,7 +25,11 @@ LODNode::LODNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
{
assert(mgr != NULL);
assert(parent != NULL);
parent->addChild(this);
// At this stage refcount is two: one because of the object being
// created, and once because it is a child of the parent. Drop once,
// so that only the reference from the parent is active, causing this
// node to be deleted when it is removed from the parent.
drop();
}
LODNode::~LODNode()