[Prototype-core] Memory Leak on IE

2008-10-30 Thread Yee Keat Phuah
Hi, Was trying to cut the memory leak reported with this tool - http://home.wanadoo.nl/jsrosman/. Found out that there are some memory leaks in prototype's Event.observe, only when the element that is observed is not within the document DOM, this might happen when 1. I have not attached the

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
Hi, FWIW, I don't think this is a bug in Prototype. Prototype keeps track of the event handlers it hooks up so it can unhook them on page unload to work around memory leaks in IE. (This also lets it provide the new stopObserving functionality in release 1.6 where you don't have to specify the

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
Looks like Firefox already has it: https://developer.mozilla.org/En/DOM_Events Googling DOMNodeRemovedFromDocument site:microsoft.com brings no joy, however. :-) -- T.J. Crowder tj / crowder software / com On Oct 30, 9:02 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, FWIW, I don't think this

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread Yee Keat Phuah
Hi, On Thu, Oct 30, 2008 at 5:02 PM, T.J. Crowder [EMAIL PROTECTED] wrote: FWIW, I don't think this is a bug in Prototype. Prototype keeps track of the event handlers it hooks up so it can unhook them on page unload to work around memory leaks in IE. (This also lets it provide the new

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
Hi, As noted from the thread I quoted above, prototype 1.6 does not unhook them on page unload anymore, it just do cache[id][eventName] = null. I'll be interested in hearing what someone from Core has to say about that change; I thought maybe they'd realized that that was all that was needed

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread kangax
On Oct 30, 11:07 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, As noted from the thread I quoted above, prototype 1.6 does not unhook them on page unload anymore, it just do cache[id][eventName] = null. I'll be interested in hearing what someone from Core has to say about that change;

[Prototype-core] Re: Memory Leak on IE

2008-10-30 Thread T.J. Crowder
The change was pulled off (perhaps it was considered too obtrusive or there was no time to test it thoroughly). I was talking about the (apparent) change between 1.5 and 1.6. I think we should at least provide some kind of `purgeObservers` method Yeah, something that accepts an element and