Thanks for reassuring, let's wait until someone else undercuts our agreement ;)
On 8 čvn, 14:22, gscholt <[email protected]> wrote: > On Jun 8, 8:44 am, romant <[email protected]> wrote: > > > Is in this case necessary to register/unregister any of the event > > handlers in onLoad/onUnload > > methods to avoid circular references/memory leaks? I checked the > > source code of Widget component and > > there is something what looks like it takes care about registering/ > > unregistering the handlers. > > > My current opinion is that only when I register an event listener by > > calling DOM.setEventListener(element, listener) > > instead of addDOMHandler() method then I should take care of > > registering/unregistering of the listener in onLoad/onUnload methods. > > And I also think that the same would be valid if extended Widget > > instead of Composite. > > > Is that right? > > I believe so. > If you use the new handler system (from any class extending Widget) > registering an unregistering the handlers is done by HandlerManager > via in the Widget class. > Using the event listeners 'raw' would require you to unregister them > before DOM detachment. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
