Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 257022 | Differences between
and this patch

Collapse All | Expand All

(-)js/org/eclipse/swt/widgets/Table.js (-6 / +12 lines)
Lines 157-179 Link Here
157
    var req = org.eclipse.swt.Request.getInstance();
157
    var req = org.eclipse.swt.Request.getInstance();
158
    if( this._horzScrollBar ) {
158
    if( this._horzScrollBar ) {
159
      this._horzScrollBar.removeEventListener( "changeValue", this._onHorzScrollBarChangeValue, this );
159
      this._horzScrollBar.removeEventListener( "changeValue", this._onHorzScrollBarChangeValue, this );
160
      this._horzScrollBar.dispose();
160
//      this._horzScrollBar.dispose();
161
      this._horzScrollBar.destroy();
161
      this._horzScrollBar = null;
162
      this._horzScrollBar = null;
162
    }
163
    }
163
    if( this._vertScrollBar ) {
164
    if( this._vertScrollBar ) {
164
      this._vertScrollBar.removeEventListener( "changeValue", this._onVertScrollBarChangeValue, this );
165
      this._vertScrollBar.removeEventListener( "changeValue", this._onVertScrollBarChangeValue, this );
165
      this._vertScrollBar.dispose();
166
//      this._vertScrollBar.dispose();
167
      this._vertScrollBar.destroy();
166
      this._vertScrollBar = null;
168
      this._vertScrollBar = null;
167
    }
169
    }
168
    if( this._clientArea ) {
170
    if( this._clientArea ) {
169
      this._clientArea.removeEventListener( "mousewheel", this._onClientAreaMouseWheel, this );
171
      this._clientArea.removeEventListener( "mousewheel", this._onClientAreaMouseWheel, this );
170
      this._clientArea.removeEventListener( "appear", this._onClientAppear, this );
172
      this._clientArea.removeEventListener( "appear", this._onClientAppear, this );
171
      this._clientArea.dispose();
173
//      this._clientArea.dispose();
174
      this._clientArea.destroy();
172
      org.eclipse.swt.WidgetManager.getInstance().remove( this._clientArea );
175
      org.eclipse.swt.WidgetManager.getInstance().remove( this._clientArea );
173
      this._clientArea = null;
176
      this._clientArea = null;
174
    }
177
    }
175
    if( this._columnArea ) {
178
    if( this._columnArea ) {
176
      this._columnArea.dispose();
179
//      this._columnArea.dispose();
180
      this._columnArea.destroy();
177
      this._columnArea = null;
181
      this._columnArea = null;
178
    }
182
    }
179
    if( this._resizeLine ) {
183
    if( this._resizeLine ) {
Lines 188-194 Link Here
188
    }
192
    }
189
    if( this._checkBoxes !== null ) {
193
    if( this._checkBoxes !== null ) {
190
      for( var i = 0; i < this._checkBoxes.length; i++ ) {
194
      for( var i = 0; i < this._checkBoxes.length; i++ ) {
191
        this._checkBoxes[ i ].dispose();
195
//        this._checkBoxes[ i ].dispose();
196
        this._checkBoxes[ i ].destroy();
192
      }
197
      }
193
      this._checkBoxes = null;
198
      this._checkBoxes = null;
194
    }
199
    }
Lines 919-925 Link Here
919
              var checkBox = this._checkBoxes.shift();
924
              var checkBox = this._checkBoxes.shift();
920
              checkBox.removeEventListener( "changeChecked", this._onCheckBoxClick, this );
925
              checkBox.removeEventListener( "changeChecked", this._onCheckBoxClick, this );
921
              checkBox.setParent( null );
926
              checkBox.setParent( null );
922
              checkBox.dispose();
927
//              checkBox.dispose();
928
              checkBox.destroy();
923
            }
929
            }
924
            var row = this._rows.shift();
930
            var row = this._rows.shift();
925
            this._unhookRowEventListener( row );
931
            this._unhookRowEventListener( row );
(-)js/org/eclipse/swt/widgets/Tree.js (-2 / +4 lines)
Lines 83-89 Link Here
83
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
83
    this.removeEventListener( "changeHeight", this._onChangeSize, this );
84
84
85
    if( this._columnArea ) {
85
    if( this._columnArea ) {
86
      this._columnArea.dispose();
86
//      this._columnArea.dispose();
87
      this._columnArea.destroy();
87
      this._columnArea = null;
88
      this._columnArea = null;
88
    }
89
    }
89
    if( this._tree ) { 
90
    if( this._tree ) { 
Lines 108-114 Link Here
108
      this._tree.removeEventListener( "blur", this._onFocusOut, this );
109
      this._tree.removeEventListener( "blur", this._onFocusOut, this );
109
      this._tree.removeEventListener( "appear", this._updateLayout, this );
110
      this._tree.removeEventListener( "appear", this._updateLayout, this );
110
      this._tree.removeEventListener( "changeElement", this._onTreeElementChange, this._tree );
111
      this._tree.removeEventListener( "changeElement", this._onTreeElementChange, this._tree );
111
      this._tree.dispose();
112
//      this._tree.dispose();
113
      this._tree.destroy();
112
      this._tree = null;
114
      this._tree = null;
113
    }
115
    }
114
  },
116
  },
(-)js/org/eclipse/swt/widgets/Separator.js (-1 / +2 lines)
Lines 44-50 Link Here
44
  },
44
  },
45
  
45
  
46
  destruct : function() {
46
  destruct : function() {
47
    this._disposeObjects( "_line" );
47
//    this._disposeObjects( "_line" );
48
    this._line.destroy();
48
  },
49
  },
49
  
50
  
50
  members : {
51
  members : {
(-)js/org/eclipse/swt/widgets/TableColumn.js (-1 / +2 lines)
Lines 68-74 Link Here
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
71
    this._disposeFields( "_sortImage" );
71
//    this._disposeFields( "_sortImage" );
72
    this._sortImage.destroy();
72
    if( !this._table.getDisposed() ) {
73
    if( !this._table.getDisposed() ) {
73
      this._table._removeColumn( this );
74
      this._table._removeColumn( this );
74
    }
75
    }
(-)js/org/eclipse/swt/widgets/DateTimeCalendar.js (-1 / +2 lines)
Lines 35-41 Link Here
35
  destruct : function() {
35
  destruct : function() {
36
    this._calendar.removeEventListener( "changeDate", this._onChangeDate, this );
36
    this._calendar.removeEventListener( "changeDate", this._onChangeDate, this );
37
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
37
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
38
    this._disposeObjects( "_calendar" );
38
    //this._disposeObjects( "_calendar" );
39
    this._calendar.destroy();
39
  },
40
  },
40
41
41
  members : {
42
  members : {
(-)js/org/eclipse/swt/widgets/CoolItem.js (-1 / +2 lines)
Lines 37-43 Link Here
37
      this._handle.removeEventListener( "mousedown", this._onHandleMouseDown, this );
37
      this._handle.removeEventListener( "mousedown", this._onHandleMouseDown, this );
38
      this._handle.removeEventListener( "mousemove", this._onHandleMouseMove, this );
38
      this._handle.removeEventListener( "mousemove", this._onHandleMouseMove, this );
39
      this._handle.removeEventListener( "mouseup", this._onHandleMouseUp, this );
39
      this._handle.removeEventListener( "mouseup", this._onHandleMouseUp, this );
40
      this._handle.dispose();
40
      //this._handle.dispose();
41
      this._handle.destroy();
41
    }
42
    }
42
  },
43
  },
43
44
(-)js/org/eclipse/swt/widgets/Scale.js (-6 / +12 lines)
Lines 106-119 Link Here
106
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
106
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
107
    this.removeEventListener( "keypress", this._onKeyPress, this );
107
    this.removeEventListener( "keypress", this._onKeyPress, this );
108
    this.removeEventListener( "mousewheel", this._onMouseWheel, this );
108
    this.removeEventListener( "mousewheel", this._onMouseWheel, this );
109
    this._disposeObjects( "_line",
109
//    this._disposeObjects( "_line",
110
                          "_thumb",
110
//                          "_thumb",
111
                          "_minMarker",
111
//                          "_minMarker",
112
                          "_maxMarker" );
112
//                          "_maxMarker" );
113
    this._line.destroy();
114
    this._thumb.destroy();
115
    this._minMarker.destroy();
116
    this._maxMarker.destroy();
113
    // Clear and dispose markers
117
    // Clear and dispose markers
114
    for( var i = 0; i < this._middleMarkers.length; i++ ) {
118
    for( var i = 0; i < this._middleMarkers.length; i++ ) {
115
      var marker = this._middleMarkers[ i ];      
119
      var marker = this._middleMarkers[ i ];      
116
      marker.dispose();
120
//      marker.dispose();
121
      marker.destroy();
117
    }                      
122
    }                      
118
  },  
123
  },  
119
124
Lines 332-338 Link Here
332
      for( var i = 0; i < this._middleMarkers.length; i++ ) {
337
      for( var i = 0; i < this._middleMarkers.length; i++ ) {
333
        var marker = this._middleMarkers[ i ];
338
        var marker = this._middleMarkers[ i ];
334
        this.remove( marker );
339
        this.remove( marker );
335
        marker.dispose();
340
//        marker.dispose();
341
        marker.destroy();
336
      }
342
      }
337
      
343
      
338
      // Create and add new markets
344
      // Create and add new markets
(-)js/org/eclipse/swt/widgets/Sash.js (-1 / +2 lines)
Lines 30-36 Link Here
30
30
31
  destruct : function() {
31
  destruct : function() {
32
    this._removeStyle( this.getOrientation() );
32
    this._removeStyle( this.getOrientation() );
33
    this._disposeObjects( "_slider" );
33
//    this._disposeObjects( "_slider" );
34
    this._slider.destroy();
34
  },
35
  },
35
36
36
  properties : {
37
  properties : {
(-)js/org/eclipse/swt/widgets/TreeItem.js (-1 / +2 lines)
Lines 71-77 Link Here
71
    if( this._checkBox != null ) {
71
    if( this._checkBox != null ) {
72
      this._checkBox.removeEventListener( "click", this._onChangeChecked, this );
72
      this._checkBox.removeEventListener( "click", this._onChangeChecked, this );
73
      this._checkBox.removeEventListener( "dblclick", this._onCheckBoxDblClick, this );
73
      this._checkBox.removeEventListener( "dblclick", this._onCheckBoxDblClick, this );
74
      this._checkBox.dispose();
74
//      this._checkBox.dispose();
75
      this._checkBox.destroy();
75
    }
76
    }
76
    this.removeEventListener( "click", this._onClick, this );
77
    this.removeEventListener( "click", this._onClick, this );
77
    this.removeEventListener( "dblclick", this._onDblClick, this );
78
    this.removeEventListener( "dblclick", this._onDblClick, this );
(-)js/org/eclipse/swt/widgets/ExpandItem.js (-1 / +4 lines)
Lines 62-68 Link Here
62
    this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this );
62
    this._chevron.removeEventListener( "mouseover", this._onHandleMouseOver, this );
63
    this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
63
    this._chevron.removeEventListener( "mouseout", this._onHandleMouseOut, this ); 
64
    this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this );   
64
    this._chevron.removeEventListener( "contextmenu", this._onContextMenu, this );   
65
    this._disposeObjects( "_header", "_chevron", "_frameBorder" );     
65
//    this._disposeObjects( "_header", "_chevron", "_frameBorder" );
66
    this._disposeObjects( "_frameBorder" );
67
    this._header.destroy();
68
    this._chevron.destroy();
66
  },
69
  },
67
70
68
  statics : {
71
  statics : {
(-)js/org/eclipse/swt/widgets/Shell.js (-1 / +2 lines)
Lines 484-490 Link Here
484
      } else {
484
      } else {
485
        if( this._blocker ) {
485
        if( this._blocker ) {
486
          this.remove( this._blocker );
486
          this.remove( this._blocker );
487
          this._blocker.dispose();
487
//          this._blocker.dispose();
488
          this._blocker.destroy();
488
          this._blocker = null;
489
          this._blocker = null;
489
        }
490
        }
490
      }
491
      }
(-)js/org/eclipse/swt/widgets/TreeColumn.js (-1 / +2 lines)
Lines 68-74 Link Here
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
68
    this.removeEventListener( "mouseout", this._onMouseOut, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
69
    this.removeEventListener( "mousedown", this._onMouseDown, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
70
    this.removeEventListener( "mouseup", this._onMouseUp, this );
71
    this._disposeFields( "_sortImage" );
71
//    this._disposeFields( "_sortImage" );
72
    this._sortImage.destroy();
72
    if( !this._tree.getDisposed() ) {
73
    if( !this._tree.getDisposed() ) {
73
      this._tree._removeColumn( this );
74
      this._tree._removeColumn( this );
74
    }
75
    }
(-)js/org/eclipse/swt/custom/CTabFolder.js (-1 / +3 lines)
Lines 57-63 Link Here
57
    this.removeEventListener( "changeWidth", this._updateLayout, this );
57
    this.removeEventListener( "changeWidth", this._updateLayout, this );
58
    this.removeEventListener( "changeHeight", this._updateLayout, this );
58
    this.removeEventListener( "changeHeight", this._updateLayout, this );
59
    this.removeEventListener( "keypress", this._onKeyPress, this );
59
    this.removeEventListener( "keypress", this._onKeyPress, this );
60
    this._disposeObjects( "_frame", "_separator" );
60
    //this._disposeObjects( "_frame", "_separator" );
61
    this._frame.destroy();
62
    this._separator.destroy();
61
    this._frameBorder.dispose();
63
    this._frameBorder.dispose();
62
  },
64
  },
63
65
(-)js/org/eclipse/swt/custom/CTabItem.js (-1 / +2 lines)
Lines 66-72 Link Here
66
      this._closeButton.removeEventListener( "click", this._onClose, this );
66
      this._closeButton.removeEventListener( "click", this._onClose, this );
67
      var wm = org.eclipse.swt.WidgetManager.getInstance();
67
      var wm = org.eclipse.swt.WidgetManager.getInstance();
68
      wm.setToolTip( this._closeButton, null );
68
      wm.setToolTip( this._closeButton, null );
69
      this._closeButton.dispose();
69
      //this._closeButton.dispose();
70
      this._closeButton.destroy();
70
      this._closeButton = null;
71
      this._closeButton = null;
71
    }
72
    }
72
  },
73
  },
(-)js/org/eclipse/swt/WidgetManager.js (-1 / +3 lines)
Lines 81-87 Link Here
81
            typePool.elements.push( widget );
81
            typePool.elements.push( widget );
82
          // dispose of widgets that cannot be pooled
82
          // dispose of widgets that cannot be pooled
83
          } else {
83
          } else {
84
            widget.dispose();
84
            // [if] Replace dispose() with destroy()
85
            // widget.dispose();
86
          	widget.destroy();
85
          }
87
          }
86
        }
88
        }
87
      }
89
      }

Return to bug 257022