summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2005-03-28 20:06:27 +0000
committerVeronika Irvine <veronika>2005-03-28 20:06:27 +0000
commit085b889af5650eb15e24717fe078a26cb6d8533a (patch)
treeaf5f9114c0d4dd2be56aeb528a6aef02c5887a33
parentc61a57d7a074a80b5b03c4761a563015a2ecc5fa (diff)
downloadeclipse.platform.swt-085b889af5650eb15e24717fe078a26cb6d8533a.tar.gz
eclipse.platform.swt-085b889af5650eb15e24717fe078a26cb6d8533a.tar.xz
eclipse.platform.swt-085b889af5650eb15e24717fe078a26cb6d8533a.zip
dispose of items then dispose of columns when disposing the Table and Tree widgets
See bugs 87997, 87559
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java10
2 files changed, 10 insertions, 10 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 666a8c2e7c..9634adcd17 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
@@ -1703,17 +1703,17 @@ void register () {
}
void releaseWidget () {
- for (int i=0; i<columnCount; i++) {
- TableColumn column = columns [i];
- if (!column.isDisposed ()) column.releaseResources ();
- }
- columns = null;
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null && !item.isDisposed ()) item.releaseResources ();
}
items = null;
currentItem = null;
+ for (int i=0; i<columnCount; i++) {
+ TableColumn column = columns [i];
+ if (!column.isDisposed ()) column.releaseResources ();
+ }
+ columns = null;
super.releaseWidget ();
if (modelHandle != 0) OS.g_object_unref (modelHandle);
modelHandle = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index c517a57f37..ecc95d4e13 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -1535,16 +1535,16 @@ void releaseItems (TreeItem [] nodes, int [] index) {
}
void releaseWidget () {
- for (int i=0; i<columnCount; i++) {
- TreeColumn column = columns [i];
- if (!column.isDisposed ()) column.releaseResources ();
- }
- columns = null;
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null && !item.isDisposed ()) item.releaseResources();
}
items = null;
+ for (int i=0; i<columnCount; i++) {
+ TreeColumn column = columns [i];
+ if (!column.isDisposed ()) column.releaseResources ();
+ }
+ columns = null;
super.releaseWidget();
if (modelHandle != 0) OS.g_object_unref (modelHandle);
modelHandle = 0;