Fix leaks of SWT Color instances
commit217eb828b6de8e37f02cf83f4a7de27679e33e30
authorRemy Suen <remysuen@ca.ibm.com>
Tue, 20 Apr 2010 00:32:09 +0000 (19 20:32 -0400)
committerChris Aniszczyk <caniszczyk@gmail.com>
Tue, 20 Apr 2010 14:39:00 +0000 (20 09:39 -0500)
tree82747ef8ff1cd1678109c0cf82a8b326c9f46fad
parent3daef8f068de0181f2eb63ab88817219335a5819
Fix leaks of SWT Color instances

FetchResultTable and PushResultTable was originally using JFace's
ColorRegistry for allocating its Color instances. The ColorRegistry
will dispose of its Colors when its owning Display is disposed. In
the case of the Eclipse workbench, the Display will only ever be
disposed when Eclipse itself shuts down.

Since the tables create new registries every time they are created,
a Color instance is leaked for every request that is made to the
registry. The code has been corrected to simply instantiate new,
local Color instances directly which are now disposed when the
table widget is disposed.

Change-Id: Ida8ffcde63a21fe92321643740b8836510a56ea8
Signed-off-By: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushResultTable.java