Moreover, the trunk version actually augments Element#update (in IE) to "purge" observers automagically : ) That was actually one of the nasty leaks being constantly reported.
- kangax On Jun 20, 10:37 am, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote: > You don't need to pass the handler; Event.stopObserving(element) will remove > all handlers for the element, and Event.stopObserving(element, 'click') will > remove all click handlers. (Correct me if I'm wrong, but that's what I > remember from my code-reading adventures on the train.) > > -Fred > > > > On Thu, Jun 19, 2008 at 5:48 PM, Gareth Evans <[EMAIL PROTECTED]> wrote: > > Hi Guys > > > I'm cleaning up the many many memory leaks in this application i've been > > working on. > > Do I still need a reference to the event observer functions to destroy > > them? > > I.e.: > > > Event.stopObserving(element,'click', ??); > > or > > element.stopObserving('click'); > > Event.stopObserving(element,'click'); > > > If there's more than one click event, this is fine as i'm going to be > > removing the element following this anyway. > > -- > Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---