From 168241f337dd558af602fd43ca16f1f2009b4802 Mon Sep 17 00:00:00 2001 From: "Klare, Heiko" Date: Thu, 21 May 2026 08:46:29 +0200 Subject: [PATCH] [Win32] Remove unnecessary color disposal in GC GC operations unnecessarily register stored colors for disposal, though colors do not need to be disposed anymore. This change removes the obsolete disposal tracking. Contributes to https://github.com/eclipse-platform/eclipse.platform.swt/issues/3296 --- .../Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java index 1f4fbb1a9b..224fb40ebb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java @@ -4859,7 +4859,6 @@ private class SetBackgroundOperation extends ReplaceableOperation { SetBackgroundOperation(Color color) { RGB rgb = color.getRGB(); this.color = new Color(rgb); - registerForDisposal(this.color); } @Override @@ -5208,7 +5207,6 @@ private class SetForegroundOperation extends ReplaceableOperation { SetForegroundOperation(Color color) { RGB rgb = color.getRGB(); this.color = new Color(rgb); - registerForDisposal(this.color); } @Override