I still have nightmares about memory management in JavaScript following an unfortunate project involving a very media-rich application running on Vizio TVs with "Yahoo Widgets for Connected TVs" (a non-HTML JavaScript app framework that derives from the old Konfabulator).<p>Not only do you have all the usual issues with JavaScript and memory, but the amount of RAM available is tiny and the garbage collector is run on a set timer and if you blow your memory budget between these timed calls to the garbage collector, the program soft crashes (you'd think an emergency gc would be scheduled if memory pressure were that high -- you'd be wrong!). Even if you were very careful to set unused objects to undefined or explicitly delete them, the memory those objects took still counted against you because of the timed gc system. Object pooling was absolutely required but even then you had to be very careful not to blow your memory budget.<p>The 'soft crash' would result in a situation where the app and overall runtime is still running but the state of the software is no longer reliable until you <i>reboot the TV</i>. And none of this stuff (the timed gc, etc) was documented at all, and there's little to no active community for "Yahoo Widgets" so you basically had to figure this all out on your own.