Managing Memory in Javascript is Hard
polarmobile.com
polarmobile.com
To be fair, they do link to some JS conversion thing, but I'd prefer to read the examples right in the article - "don't make me think" and all that.
edit: Disclaimer: I have written and am still occasionally writing canvas rendering stuff in coffeescript and after some meddling around with some annoying bits it has been quite pleasant. For example you should make sure that functions that don't need to return anything, return false or null or undefined. Otherwise coffeescript will return whatever your last statement evaluates to. This is especially bad if the last thing is a loop.
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.
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 reboot the TV. 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.
These are the same problems from Actionscript (I know the crowd here has no love for AS though).
Not only should you consider using object pooling for JS objects (like the author describes), but you also want to think about DOM element pooling, especially when you are dealing with large lists.