diff options
author | Grant Gayed <grant_gayed@ca.ibm.com> | 2011-12-19 15:57:38 -0500 |
---|---|---|
committer | Grant Gayed <grant_gayed@ca.ibm.com> | 2011-12-19 15:58:54 -0500 |
commit | 56cf18cd467bb60db4df938039f634ae45346298 (patch) | |
tree | 5db3e260c79a692700037ecdf0af43d98f39293b /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | |
parent | d6bd55e488730f8f966054d0eb048eea308ce3ad (diff) | |
download | eclipse.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/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 26bf464ea9..a6ee89d464 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -1671,6 +1671,7 @@ public TableItem [] getSelection () { for (int i=0; i<count; i++) { int /*long*/ data = OS.g_list_nth_data (list, i); int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + OS.gtk_tree_path_free (data); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); @@ -1743,8 +1744,13 @@ public int getSelectionIndex () { for (int i=0; i<count; i++) { int /*long*/ data = OS.g_list_nth_data (list, i); int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + OS.gtk_tree_path_free (data); if (indices != 0) { OS.memmove (index, indices, 4); + for (int j = i + 1; j < count; j++) { + data = OS.g_list_nth_data (list, j); + OS.gtk_tree_path_free (data); + } break; } } @@ -1796,6 +1802,7 @@ public int [] getSelectionIndices () { for (int i=0; i<count; i++) { int /*long*/ data = OS.g_list_nth_data (list, i); int /*long*/ indices = OS.gtk_tree_path_get_indices (data); + OS.gtk_tree_path_free (data); if (indices != 0) { int [] index = new int [1]; OS.memmove (index, indices, 4); |