Icinga/DbObject: explizit destruction

This commit is contained in:
Thomas Gelf 2016-02-04 16:58:32 +01:00
parent ac6464c5e4
commit 88ffc6baf2
2 changed files with 19 additions and 0 deletions

View File

@ -966,4 +966,10 @@ abstract class DbObject
$obj->setConnection($connection)->setKey($id);
return $obj->existsInDb();
}
public function __destruct()
{
unset($this->db);
unset($this->connection);
}
}

View File

@ -1125,4 +1125,17 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
}
}
}
public function __destruct()
{
unset($this->resolveCache);
unset($this->vars);
unset($this->groups);
unset($this->imports);
unset($this->ranges);
unset($this->arguments);
parent::__destruct();
}
}