I know the easiest way to fix this is to reboot the mac regularly, but I forget to reboot it sometimes for as long as 3 months.
To address this, I created RememberRestart, a small app that reminds you to restart your Mac at optimal intervals.
I'm eager to hear your thoughts and suggestions. Check it out on GitHub.