Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2011-12-19 20:57:38 +0000
committerGrant Gayed2011-12-19 20:58:54 +0000
commit56cf18cd467bb60db4df938039f634ae45346298 (patch)
tree5db3e260c79a692700037ecdf0af43d98f39293b /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop
parentd6bd55e488730f8f966054d0eb048eea308ce3ad (diff)
downloadeclipse.platform.swt-56cf18cd467bb60db4df938039f634ae45346298.tar.gz
eclipse.platform.swt-56cf18cd467bb60db4df938039f634ae45346298.tar.xz
eclipse.platform.swt-56cf18cd467bb60db4df938039f634ae45346298.zip
Bug 367120 - gtk_tree_selection_get_selected_rows() invocations are
leaking
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
index b3656bb1da..dc77be2cf6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -99,7 +99,8 @@ public class TableDragSourceEffect extends DragSourceEffect {
if (count == 1) {
int /*long*/ path = OS.g_list_nth_data (list, 0);
int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path);
- dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0);
+ dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0);
+ OS.gtk_tree_path_free (path);
} else {
int width = 0, height = 0;
int[] w = new int[1], h = new int[1];
@@ -115,6 +116,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
height = rect.y + h[0] - yy[0];
yy[i] = rect.y;
hh[i] = h[0];
+ OS.gtk_tree_path_free (path);
}
int /*long*/ source = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), width, height, -1);
int /*long*/ gcSource = OS.gdk_gc_new(source);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index f6e0067a4a..586fb56338 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -98,7 +98,8 @@ public class TreeDragSourceEffect extends DragSourceEffect {
if (count == 1) {
int /*long*/ path = OS.g_list_nth_data (list, 0);
int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path);
- dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0);
+ dragSourceImage = Image.gtk_new(display, SWT.ICON, pixmap, 0);
+ OS.gtk_tree_path_free (path);
} else {
int width = 0, height = 0;
int[] w = new int[1], h = new int[1];
@@ -114,6 +115,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
height = rect.y + h[0] - yy[0];
yy[i] = rect.y;
hh[i] = h[0];
+ OS.gtk_tree_path_free (path);
}
int /*long*/ source = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), width, height, -1);
int /*long*/ gcSource = OS.gdk_gc_new(source);

Back to the top