Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Add a destroy() method to your views that unbinds any events bound in the initialize() method or other methods and then calls remove() on `this` (for every .on() have a corresponding .off()). Call this .destroy() method instead of remove(). Most of the time this should free up all references so the javascript GC can sweep and clean up old views.

Another option is to reuse the same views and never re-render the same view twice.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: