SimplePie 1.3.1 is now available. Upgrade now!

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/05 19:56 (external edit)