Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy the object and release the resources. #11

Open
moiseevigor opened this issue Dec 14, 2012 · 2 comments
Open

Destroy the object and release the resources. #11

moiseevigor opened this issue Dec 14, 2012 · 2 comments

Comments

@moiseevigor
Copy link

What will be the correct way to destroy the gallery and release all listeners etc?

@martinaglv
Copy link
Collaborator

If the elements TouchTouch is listening on are removed, so are the event listeners. Do you have a specific use case in mind?

@moiseevigor
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants