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 to break the chain (since the issue with IE relates to
*circular* references, not just references), but I never quite
understood how doing that would be breaking them.  But now I can't get
IE6 to leak memory if I unload the page even using Crockford's
"queuetest2"[1] (which is designed to demonstrate the circular
reference leak, and does so, but within an active page).  Maybe
somewhere along the line M$ managed to slip a fix into a service pack
that at least made IE semi-reliably clean up on page *unload*, even
though not otherwise.  But I know it doesn't do it reliably.

[1] http://javascript.crockford.com/memory/queuetest2.html

All of that is tangental, though, to the main point of your thread:
Cleaning things up when the page is still loaded, and you're just
removing elements.  I still think doing that is in the domain of the
application logic, not the library.  That's my take; others may
differ. :-)
--
T.J. Crowder
tj / crowder software / com

On Oct 30, 9:41 am, "Yee Keat Phuah" <[EMAIL PROTECTED]> wrote:
> 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
> > stopObserving functionality in release 1.6 where you don't have to
> > specify the handler to unhook things.)  This means that it has to use
> > a small bit of memory to track the handlers.  That's not a *leak*, I
> > wouldn't say, but a *use* of memory.
>
> 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. prototype 1.5 does "unblock them on page unload" using
> stopObserving while iterating over each of the handlers.
>
> Cheers,
> Phuah Yee Keat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to