Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsColor and dispose
https://www.eclipse.org/forums/index.php/mv/msg/141335/445449/#msg_445449
When i do this:
public class MyTest extends Composite {
public MyTest (final Composite argParent, final int argStyle) {
super(argParent, SWT.NONE);
Color colorB = argParent.getDisplay()
.getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
setBackground(colorB);
}
....
Do i have to dispose the colorB to avoid memory leak ????
Thanks
JMi]]>jmi2004-11-05T21:38:11-00:00Re: Color and dispose
https://www.eclipse.org/forums/index.php/mv/msg/141335/445452/#msg_445452
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Not for system colors. You don't own them so you don't dispose them.
If instead you did a new color here, then yes you would need to dispose
it when no longer needed.
--
Thanks,
Rich Kulp]]>2004-11-05T22:47:15-00:00Re: Color and dispose
https://www.eclipse.org/forums/index.php/mv/msg/141335/445479/#msg_445479
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:cmgvst$69s$1@eclipse.org...
> Not for system colors. You don't own them so you don't dispose them.
>
> If instead you did a new color here, then yes you would need to dispose it
> when no longer needed.
>
>
> --
> Thanks,
> Rich Kulp]]>jmi2004-11-06T10:24:50-00:00