From: Raphaël Barrois Date: Sun, 3 Jun 2012 11:37:17 +0000 (+0200) Subject: Add a __destruct to Profile. X-Git-Tag: xorg/1.1.6~44 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=2c61c11c0423be0be63cdac338fd6473a570f146;p=platal.git Add a __destruct to Profile. Signed-off-by: Raphaël Barrois --- diff --git a/classes/profile.php b/classes/profile.php index b11e31d..a05ed66 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -171,6 +171,13 @@ class Profile implements PlExportable $this->visibility = $visibility; } + private function __destruct() + { + // Need to delete objects allocated by the profile + // http://www.php.net/manual/en/function.unset.php#98692 + unset($this->owner); + } + public function id() { return $this->pid;