Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Dispose Code - Need Everywhere, what needs to be disposed?
Dispose Code - Need Everywhere, what needs to be disposed? [message #371728] Tue, 15 July 2003 13:44 Go to next message
Eclipse UserFriend
Originally posted by: soni29.hotmail.com

hi,
i had a question regarding the following lines of code:

while (!shell.isDisposed ())
{
if (!display.readAndDispatch ())
{
display.sleep ();
}
}
display.dispose ();

does this code need to be everywhere, or just in one place? if i have 3
shells, do i need it in all of them? what if i have my main in a class
that does not include a shell, maybe makes an object of another class that
will be the shell, does it have to be in both or just the one with main?

Also with dispose, do i need to dispose of everything? can't i just
dispose of the Display and shouldn't that in turn dipose everything else,
if i have 20 gui components in a shell do i have to remove all of the
myself, what about variables such as Integer or File?

Thank you.



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Re: Dispose Code - Need Everywhere, what needs to be disposed? [message #371730 is a reply to message #371728] Tue, 15 July 2003 14:10 Go to previous message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.remove.com

see this: http://www.eclipse.org/articles/swt-design-2/swt-design-2.ht ml

a.
--
eclipse.org
Previous Topic:tabing outta table
Next Topic:swt Color and dispose?
Goto Forum:
  


Current Time: Fri Apr 26 18:24:31 GMT 2024

Powered by FUDForum. Page generated in 0.03166 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top