From 2c61c11c0423be0be63cdac338fd6473a570f146 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Sun, 3 Jun 2012 13:37:17 +0200 Subject: [PATCH] Add a __destruct to Profile. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/profile.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.1.4