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

Fix memory leak in stopObserving when it may keep a reference to watched elements forever (until page reload) #21

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@kir
Contributor

kir commented Jun 13, 2011

Hello,

The existing code of stopObserving doesn't cleanup CACHE variable which is used to cleanup all observers on page unload. Even if I detach all handlers from an element using stopObserving(), the CACHE variable will still have a reference to the element (and the whole tree).

The proposed patch fixes the problem.

Thanks,
KIR

@kir

This comment has been minimized.

Show comment
Hide comment
@kir

kir Jun 24, 2011

Contributor

My original fix introduced a performance problem with stopObserving call. Now, this problem is fixed.

Contributor

kir commented Jun 24, 2011

My original fix introduced a performance problem with stopObserving call. Now, this problem is fixed.

@savetheclocktower

This comment has been minimized.

Show comment
Hide comment
@savetheclocktower

savetheclocktower Jul 4, 2011

Collaborator

I just merged my rewrite of dom.js and event.js — it fixes this problem. Thanks!

Collaborator

savetheclocktower commented Jul 4, 2011

I just merged my rewrite of dom.js and event.js — it fixes this problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment