From 7fa620cce54f7fd187c477df080ebed33c818b07 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 Feb 2014 15:57:19 +0100 Subject: SimplePie Fuite de mémoire PHP 5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/marienfressinaud/FreshRSS/issues/415 http://simplepie.org/wiki/faq/i_m_getting_memory_leaks (Pas testé) --- app/Controllers/feedController.php | 1 + app/Models/Feed.php | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'app') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 918f007fd..056ed96b5 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -246,6 +246,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feedDAO->updateFeed($feed->id(), array('url' => $feed->url())); } $feed->faviconPrepare(); + unset($feed); } catch (FreshRSS_Feed_Exception $e) { Minz_Log::record ($e->getMessage (), Minz_Log::NOTICE); $feedDAO->updateLastUpdate ($feed->id (), 1); diff --git a/app/Models/Feed.php b/app/Models/Feed.php index c71fb41ae..e94ae2b3a 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -224,6 +224,9 @@ class FreshRSS_Feed extends Minz_Model { syslog(LOG_DEBUG, 'FreshRSS use cache for ' . $subscribe_url); $this->entries = array(); } + + $feed->__destruct(); //http://simplepie.org/wiki/faq/i_m_getting_memory_leaks + unset($feed); } } } @@ -273,6 +276,7 @@ class FreshRSS_Feed extends Minz_Model { $entry->loadCompleteContent($this->pathEntries()); $entries[] = $entry; + unset($item); } $this->entries = $entries; -- cgit v1.2.3