[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Dispose Code - Need Everywhere, what needs to be disposed?
|
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/