RAM use is typically small compared to VRAM use. In the browser, if it supports WebGL, we manage memory layout-by-layout ourselves. If it doesn't, it's up to the browser to manage it - and if Safari isn't doing a good job you need to ask Apple to fix it, since there's not much else we can do... As for CocoonJS, we have supported memory management in our code for a long time now,
ludei just need to add some functions and our engine will detect it and automatically start using it. However Ludei haven't made any progress on this for a while, despite its absolutely crucial importance - the largest games are often the best, and not having memory management rules out the largest and best games. So please ask Ludei to hurry up!