What made memory management challenging in that application?
It's running as a shared library under the BEAM so it better not leak or the OOM killer will come after me.