SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » __destruct()



class SimplePie {
	__destruct ()

There is a bug in versions of PHP older than 5.3 where PHP doesn't release memory properly in certain cases. This issue is discussed further in the I'm getting memory leaks! page.


  • Available since SimplePie 1.1.


Calling the destructor before unsetting the object reference

for ($i = 1; $i < 10; $i++)
	$feed = new SimplePie();
	$item = $feed->get_item(0); 
	$feed->__destruct(); // Do what PHP should be doing on it's own.
	echo "Memory usage: " . number_format(memory_get_usage()); 

See Also

reference/simplepie/destruct.txt · Last modified: 2011/03/06 03:56 (external edit)