[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How can I collect system resource from static object?

ColorConstants is a Swing class, so this isn't an applicable case.

In general though, since resources like swt.Color are created on a Device
(usually a Display), adding a Dispose listener on the Display will notify
you when it's a good time to dispose() resources like this.  If your app
ends without receiving this notification (eg.- the JVM is terminated
externally) then these resources are automatically returned to the OS.

Grant


"Jiyul" <softwitch@xxxxxxxxx> wrote in message
news:g0e7gu$m0t$1@xxxxxxxxxxxxxxxxxxxx
> for example:
> ColorConstants.red (It's 'public static final Color')
>
> Who release this system resource? and when?
>
> When I terminate JVM without any calling dispose methods in Java program
> which has assigned system resources by using SWT, then What will be
happen?