disposing class attributes [message #449483] |
Tue, 25 January 2005 08:16  |
Eclipse User |
|
|
|
Hi !
Im relatively new to swt programming... I have a question: I have a
widget that extends Composite and I want to know how to properly
dispose resources allocated by instances of my class...
I know that making it in finalizer is very bad idea so I searched a
little bit and I think that I will implement DisposeLitener interface
on my class and register it in as disposeListener in constructor...
then I will implement widgetDisposed() method where I will do needed
resource disposing...
Is it the right way ?
Im working only on small part of bigger eclipse plugin so I rely on
fact that somewhere "higher" is my widget properly disposed - Im not
responsible for creating it etc, I only changed some internals and now
I need to dispose some internal attributes upon closing of this
widget...
Thank for any answer...
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.32148 seconds