Null out references to elements in cache on page unload. Need this in addition to the Event#stopObserving calls to clean up memory leaks. [#425 state:resolved] (ykphuah, mr_justin, Andrew Dupont)

This commit is contained in:
Andrew Dupont 2009-02-27 16:45:51 -06:00
parent 47abfa68f0
commit d22a9988fa
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,5 @@
* Null out references to elements in cache on page unload. Need this in addition to the Event#stopObserving calls to clean up memory leaks. [#425 state:resolved] (ykphuah, mr_justin, Andrew Dupont)
* Ensure `toString` and `valueOf` properties are copied to a subclass only when necessary in IE6. [@382 state:resolved] (Samuel Lebeau)
* Make sure `getAttribute` is used without flag when accessing the "type" attribute of an iframe (IE throws error otherwise). [#118 state:resolved] (Zekid, kangax)

View File

@ -1,7 +1,7 @@
(function() {
/** section: dom
* Event
* Event
**/
var Event = {
KEY_BACKSPACE: 8,
@ -299,8 +299,10 @@
}
function _destroyCache() {
for (var i = 0, length = CACHE.length; i < length; i++)
for (var i = 0, length = CACHE.length; i < length; i++) {
Event.stopObserving(CACHE[i]);
CACHE[i] = null;
}
}
var CACHE = [];
@ -481,7 +483,7 @@
});
/** section: dom
* document
* document
**/
Object.extend(document, {
/** related to: Event.fire