Event.observers (to the best of my knowledge) merely exists to fix an IE memory leak.
2158 /* prevent memory leaks in IE */ 2159 if (navigator.appVersion.match(/\bMSIE\b/)) 2160 Event.observe(window, 'unload', Event.unloadCache, false); The only reason that any events are put into Event.observers is so when the unload event fires for the window object prototype.js can quickly spin through an entire list of events that WERE observed to remove the reference (and prevent a potential circular reference that IE's garbage collector will miss). Basically, Event.observers is a 'behind-the-scenes' type of element and you really don't even need to worry about it at all. It's tempting to want to keep Event.observers clean and up to date with your current observational model, but this is a mistake and will just end up being a frustration in the long run. -E On 12/13/06, heidmotron <[EMAIL PROTECTED]> wrote: > > Just wondering why Event.stopObserving() doesn't remove the itself from > the Event.obervers array? > > Is there a reason for this? > > > > > -- Eric Ryan Harrison --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
