Do I need to remove listeners? [message #467595] |
Wed, 01 February 2006 16:59 |
Mike Higginbotham Messages: 22 Registered: July 2009 |
Junior Member |
|
|
I am somewhat familiar with Swing and its lapsed listener problems. Does
SWT have the same or similar problem? My colleague is seeing leaked
listeners using Eclipse TPTP.
I put breakpoints in the Button.removeSelectionListener,
Widget.removeListener and Widget.removeDisposeListener methods as well
as the EventTable.unhook methods. I added a selection listener to a
button on my dialog. When I closed my dialog, none of the breakpoints
were reached. This tells me the listeners where not automatically
removed. Is this a problem? If not, why not? If so, why aren't listeners
automatically removed from controls like Button? Do I need to remove
listeners on my own by adding a dispose listener and while handling the
event remove all other listeners as well as the dispose listener?
Thanks,
Mike
|
|
|
Powered by
FUDForum. Page generated in 0.03006 seconds