I'm not a javascript memory management specialist, but from what I know:
Make sure all event handlers are cleared. Any event handlers attached to an object / element will make it difficult for the GC to do its job.
Use prototype inheritance whenever possible: (http://www.crockford.com/javascript/private.html). It allows objects to refer to the same method in memory instead of re-creating one for each object - saving memory and increasing performance for the javascript engine.
Indicate any variables / properties that are not used.
Hope this helps
source share