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

Y.Node._instances breaks GC #2014

Open
wants to merge 10 commits into
base: dev-master
Choose a base branch
from
Open

Y.Node._instances breaks GC #2014

wants to merge 10 commits into from

Conversation

jafl
Copy link
Contributor

@jafl jafl commented Jan 14, 2019

Replacement for #1637

Breaking the GC model drags us back to manual memory management. IE6 and IE7 force us to do this anyway, but YUI should not force this upon developers who choose to not target these older browsers.

Another example: If I dereference a Node instance and pass it to a 3rd party widget that operates on raw DOM elements, then even if that widget cleans up correctly, the DOM node won't get cleaned up as long as the Node instance still exists.

By using a WeakMap to store the mapping between DOM nodes and Y.Node's, none of this is a problem.

@andrewnicols
Copy link
Contributor

Just to remind you that YUI is no longer under any development and no issues will be merged.

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

Successfully merging this pull request may close these issues.

2 participants