summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorArun Thondapu2012-05-09 07:07:46 (EDT)
committer Silenio Quarti2012-05-09 10:38:50 (EDT)
commit11d4642e5be7f3df50c1e41c1d73363921616eda (patch)
treee47bf64fa07c3d8c46fe509c50fcec0c8a391438
parent27832d746ae6672db3c0710dbd619e5426d2cf8f (diff)
downloadeclipse.platform.swt-11d4642e5be7f3df50c1e41c1d73363921616eda.zip
eclipse.platform.swt-11d4642e5be7f3df50c1e41c1d73363921616eda.tar.gz
eclipse.platform.swt-11d4642e5be7f3df50c1e41c1d73363921616eda.tar.bz2
Fix memory leak in Shell#setToolTipText()
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index e4f6baf..818f311 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2402,6 +2402,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
} else if (buffer != null && oldTooltip != 0) {
if (OS.strcmp (oldTooltip, buffer) == 0) return;
}
+ if (oldTooltip != 0) OS.g_free(oldTooltip);
OS.gtk_widget_set_tooltip_text (rootWidget, null);
/*
* Bug in GTK. In GTK 2.12, due to a miscalculation of window