[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: getBackground and dispose

Generally no.  A resource like Color should be disposed when both of the
following are true for it:
- you created it (ie.- at some point you invoked new Color(...), new
Image(...), etc.)
- it's no longer being used anywhere (in your example, the widget that you
invoked getBackground() on is still using it, so disposing it would not be
good)

Grant

<omry_y@xxxxxxxxxxxx> wrote in message news:d8hemf$1ci$1@xxxxxxxxxxxxxxxxxxx
> Should a color object obtained through getBackground() be disposed after
> use?