diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
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); |