aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2012-05-09 07:07:46 (EDT)
committerSilenio Quarti2012-05-09 10:34:15 (EDT)
commitf90f7af3df5ef739b7d7ba537ec4821eef39ebe4 (patch)
tree9311af64cb9413cfb6ea8b8df1e191e251fb5f75
parent3435c841ff1fddd408f0370db7b59b1a4fd87446 (diff)
downloadeclipse.platform.swt-f90f7af3df5ef739b7d7ba537ec4821eef39ebe4.zip
eclipse.platform.swt-f90f7af3df5ef739b7d7ba537ec4821eef39ebe4.tar.gz
eclipse.platform.swt-f90f7af3df5ef739b7d7ba537ec4821eef39ebe4.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