From d228a306d433b142b8baedd74b2b9d40c4d2cda1 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 25 Feb 2010 19:50:00 +0100 Subject: [PATCH] Fix http://code.google.com/p/xmpphp/issues/detail?id=62 - memory leak --- XMPPHP/Roster.php | 1 + 1 file changed, 1 insertion(+) diff --git a/XMPPHP/Roster.php b/XMPPHP/Roster.php index ccbf6c8..50f4023 100644 --- a/XMPPHP/Roster.php +++ b/XMPPHP/Roster.php @@ -127,6 +127,7 @@ class Roster { $this->roster_array[$jid]['presence'][$resource] = array('priority' => $priority, 'show' => $show, 'status' => $status); } else { //Nuke unavailable resources to save memory unset($this->roster_array[$jid]['resource'][$resource]); + unset($this->roster_array[$jid]['presence'][$resource]); } }