... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-10-12

SWT Widget.dispose() Doesn't Get Called

The API documentation for org.eclipse.swt.widgets.Widget#dispose() has this interesting tidbit:

NOTE: This method is not called recursively on the descendents of the receiver. This means that, widget implementers can not detect when a widget is being disposed of by re-implementing this method, but should instead listen for the Dispose event.

Thus, the only reliable way for a widget to know if it has been disposed is to add a DisposeListener to itself.

Blog Archive