I noticed that Event.stopObserving does not actually remove the array
of [element,name,observer] from the observers cache that it adds when
you call Event.observe. Could this be preventing proper garbage
collection? Say you create a div and observe it with Event.observe and
a function that contains a closure (e.g. bind()), then later remove
that element from the DOM and all references to it that you have
control over, there is still a reference to it in the observers cache
and a reference to that function in the observers cache.  Does this not
prevent that memory from being regained after the stopObserving call
completes?

I don't think I understand javascript garbage collection completely..
This article is what got me thinking about this, I'm sure most of you
have read it:
http://javascript.crockford.com/memory/leak.html

Thanks,
Colin


--~--~---------~--~----~------------~-------~--~----~
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