diff options
author | Felipe Heidrich <fheidric> | 2009-03-30 21:01:01 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2009-03-30 21:01:01 +0000 |
commit | 65467967ece15fcbb67b84f1168cf90816f6b638 (patch) | |
tree | 790feef5f263b2aff43323fbb16530f35719c207 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java | |
parent | 71b572d2e7bab3c991023ca924477f0b41864d64 (diff) | |
download | eclipse.platform.swt-65467967ece15fcbb67b84f1168cf90816f6b638.tar.gz eclipse.platform.swt-65467967ece15fcbb67b84f1168cf90816f6b638.tar.xz eclipse.platform.swt-65467967ece15fcbb67b84f1168cf90816f6b638.zip |
Bug 270262: Leaks in ToolTip
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 7ce084ceb4..9ec9bfd3e5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -91,6 +91,7 @@ public ToolTip (Shell parent, int style) { super (parent, checkStyle (style)); this.parent = parent; createWidget (0); + parent.addToolTip (this); } static int checkStyle (int style) { @@ -294,6 +295,7 @@ void deregister () { void destroyWidget () { int /*long*/ topHandle = topHandle (); + if (parent != null) parent.removeTooTip (this); releaseHandle (); if (topHandle != 0 && (state & HANDLE) != 0) { if ((style & SWT.BALLOON) != 0) { @@ -771,6 +773,7 @@ public void setText (String string) { * </ul> */ public void setVisible (boolean visible) { + checkWidget (); if (timerId != 0) OS.gtk_timeout_remove(timerId); timerId = 0; if (visible) { |