Open moiseevigor opened 11 years ago
If the elements TouchTouch is listening on are removed, so are the event listeners. Do you have a specific use case in mind?
Hi, simply it is nice to have a destructor of an object just in case :) Similar to http://api.jqueryui.com/sortable/#method-destroy. So this is just the good practice I suppose.
But I stated the question because of one problem we encounter in life. We're doing single page web application. The user can load and check many galleries of different users, so I'm getting worried about memory consumption and overall performance of the app with many object initialized (some stats: application fully loaded - 110MB, touchTouch initialized with 100 photos and used for some minutes 125-130MB).
Will be difficult to implement the destructor OR reuse the same object with absolute new photo set?
Thank you Martin!
What will be the correct way to destroy the gallery and release all listeners etc?