It seems quite a few people are still having trouble with SimplePie’s memory leaks, so I thought I would write a new post to say how I have modified SimplePie. If you aren’t a PHP programmer, you probably don’t want to read this post… For more background on this post, you probably want to read my other post.
It is possible that version 1.1 of SimplePie has fixed this issue, though Aman left a comment on my other post telling me that it didn’t. I currently use a heavily patched version of revision 901 from the SVN (I think… I may have updated since then…) so I can’t really tell you… I wish I had time to update and re-patch everything!
To fix the memory leak issues I was experiencing, I replaced the SimplePie::__destruct() method with a more “hardcore” version, hopefully forcing PHP to clear all references, and thus allowing it to clear memory:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
It seems to work for me, let me know if it works for you!