Memory is so cheap today that there is no need for either garbage collection or FMOM (forced management of memory).
Just write your /prog/rams so that they can be restarted easily and quickly before they reach, say, 7 GB of heap (a reasonable amount, based on the current price of < $50 for 2x4GB DDR3).