Neither of those solutions work. PF has had memory leak issues on and off for years. Frankly, there were better under PF8 but that version is unusable for a variety of other reasons that I went back to PF7.
Interesting... for me it's been the opposite. PF7 memory usage wasn't bad enough for me to notice and PF8 is considerably worse. But PF8 is largely stable for me and this is the only major issue I have. But that might be something to do with the fact that I'm not making use of the new module features.