Is it necessary to dispose resources in Eclipse plugin

car salesman

New Member
I am new to eclipse development, and while learning SWT, I came to know that I need to dispose the \[code\]display\[/code\] using below fragment:\[code\]while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep ();}display.dispose ();\[/code\]So it disposes all of the OS resources acquired by display. My question is should I do the same thing in Eclipse plugin? Consider we have a \[code\]createPartControl()\[/code\] code like this:\[code\]public void createPartControl(Composite parent) { //Other codes parent.dispose(); //Shoud I compulsory do this in eclipse plugin?}\[/code\]Or will eclipse take care of disposing resource automatically? My assumption is I should dispose manually. Can you kindly correct me if I'm wrong?
 
Back
Top