From e069e974e87506af5ea24fd76434780f115ce741 Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Tue, 1 Aug 2023 19:15:02 +0100 Subject: [PATCH] Eliminate GC resource leak --- dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF | 2 +- .../gdb/internal/ui/osview/ResourceClassContributionItem.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF index e09f59cb17a..6375e4e9e55 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true -Bundle-Version: 2.8.100.qualifier +Bundle-Version: 2.8.200.qualifier Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java index 4a3760e67d9..d7257886f23 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2014 Mentor Graphics and others. + * Copyright (c) 2011, 2023 Mentor Graphics and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -10,6 +10,7 @@ * * Contributors: * Vladimir Prus (Mentor Graphics) - initial API and implementation + * John Dallaway - eliminate GC resource leak (#482) *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.internal.ui.osview; @@ -147,6 +148,7 @@ private int populateCombo() { // in new GDB version, no problem -- the combo will be resized when it's populated. width = gc.textExtent("Shared memory regions").x; //$NON-NLS-1$ } + gc.dispose(); // Because there's no way whatsoever to set the width // of the combobox list, only complete length, we just add