Node: clean up destructor

This commit is contained in:
Thomas Gelf 2014-11-30 11:12:03 +01:00
parent 9b53ae4382
commit 0a1c14c01a

View file

@ -144,15 +144,13 @@ abstract class Node
return false;
}
public function __destruct()
{
// required to avoid memleeks in PHP < 5.3:
$this->parent = null;
$this->children = array();
}
public function __toString()
{
return $this->name;
}
public function __destruct()
{
unset($this->parent);
}
}