yui/yui3 — pull request #1637 by jafl (2014-02-12 23:53:04+00:00)
Title: Y.Node._instances breaks GC

This picks up where the old Ticket #2532270 left off.

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 storing the Y.Node reference on the DOM element instead of in Y.Node._instances, then none of this is a problem.