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:
parent
1ba3e60baa
commit
fa512b8010
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user