Hi !

We are encountering some memory leaks issues (mainly in IE of course) in 
our application that is based on the MVP pattern. After a deep code 
analysis we discovered that:

 - We forgot to remove some handlers (using removeHandler() method from 
HandlerRegistration) on some custom widget we have created. 

 - Some of the core GWT widget we use (such as DateBox or DialogBox) have 
some handler registrations that are never removed using the previous method.

 - Some of the handlers added in the bind() method of some presenters were 
also never removed, from the global EventBus or even on some widgets

 After reading some interesting documentation and other developpers 
experiences such as 
https://developers.google.com/web-toolkit/articles/dom_events_memory_leaks_and_you
 
or http://www.draconianoverlord.com/2010/11/23/gwt-handlers.html it seems 
that removing handlers in the onUnload() method of a Widget seems to be 
pointless in most cases, as GWT already manage to do that ...  and that 
would explain why some of the core GWT widgets don't even care to remove 
those handlers ...

Does it worth going through each component on which we didn't unregistered 
some handlers in the onUnload method and unregister those handlers or is it 
just pointless, meaning that we should rather focus on the application part 
(EventBus, Presenters etc ...)? 

In a more general way, is there a way to detect (unit tests or integration 
tests) that all listeners of an event source are actually removed when they 
should have ?

Thanks !

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to