public/javascripts/yui/datatable/datatable-debug.js
function() {
    // Store for later
    var instanceName = this.toString();

    this._oChainRender.stop();
    
    // Destroy static resizer proxy and column proxy
    DT._destroyColumnDragTargetEl();
    DT._destroyColumnResizerProxyEl();
    
    // Destroy ColumnDD and ColumnResizers
    this._destroyColumnHelpers();
    
    // Destroy all CellEditors
    var oCellEditor;
    for(var i=0, len=this._oColumnSet.flat.length; i<len; i++) {
        oCellEditor = this._oColumnSet.flat[i].editor;
        if(oCellEditor && oCellEditor.destroy) {
            oCellEditor.destroy();
            this._oColumnSet.flat[i].editor = null;
        }
    }

    // Destroy Paginator
    this._destroyPaginator();

    // Unhook custom events
    this._oRecordSet.unsubscribeAll();
    this.unsubscribeAll();

    // Unhook DOM events
    Ev.removeListener(document, "click", this._onDocumentClick);
    
    // Clear out the container
    this._destroyContainerEl(this._elContainer);

    // Null out objects
    for(var param in this) {
        if(lang.hasOwnProperty(this, param)) {
            this[param] = null;
        }
    }
    
    // Clean up static values
    DT._nCurrentCount--;
    
    if(DT._nCurrentCount < 1) {
        if(DT._elDynStyleNode) {
            document.getElementsByTagName('head')[0].removeChild(DT._elDynStyleNode);
            DT._elDynStyleNode = null;
        }
    }

    YAHOO.log("DataTable instance destroyed: " + instanceName);
}
function() {
    // Store for later
    var instanceName = this.toString();

    this._oChainRender.stop();
    
    // Destroy static resizer proxy and column proxy
    DT._destroyColumnDragTargetEl();
    DT._destroyColumnResizerProxyEl();
    
    // Destroy ColumnDD and ColumnResizers
    this._destroyColumnHelpers();
    
    // Destroy all CellEditors
    var oCellEditor;
    for(var i=0, len=this._oColumnSet.flat.length; i<len; i++) {
        oCellEditor = this._oColumnSet.flat[i].editor;
        if(oCellEditor && oCellEditor.destroy) {
            oCellEditor.destroy();
            this._oColumnSet.flat[i].editor = null;
        }
    }

    // Destroy Paginator
    this._destroyPaginator();

    // Unhook custom events
    this._oRecordSet.unsubscribeAll();
    this.unsubscribeAll();

    // Unhook DOM events
    Ev.removeListener(document, "click", this._onDocumentClick);
    
    // Clear out the container
    this._destroyContainerEl(this._elContainer);

    // Null out objects
    for(var param in this) {
        if(lang.hasOwnProperty(this, param)) {
            this[param] = null;
        }
    }
    
    // Clean up static values
    DT._nCurrentCount--;
    
    if(DT._nCurrentCount < 1) {
        if(DT._elDynStyleNode) {
            document.getElementsByTagName('head')[0].removeChild(DT._elDynStyleNode);
            DT._elDynStyleNode = null;
        }
    }

    YAHOO.log("DataTable instance destroyed: " + instanceName);
}
function ( ) { // Store for later var instanceName = this . toString ( ) ; this . _oChainRender . stop ( ) ; // Destroy static resizer proxy and column proxy DT . _destroyColumnDragTargetEl ( ) ; DT . _destroyColumnResizerProxyEl ( ) ; // Destroy ColumnDD and ColumnResizers this . _destroyColumnHelpers ( ) ; // Destroy all CellEditors var oCellEditor ; for ( var i = 0 , len = this . _oColumnSet . flat . length ; i < len ; i ++ ) { oCellEditor = this . _oColumnSet . flat [ i ] . editor ; if ( oCellEditor && oCellEditor . destroy ) { oCellEditor . destroy ( ) ; this . _oColumnSet . flat [ i ] . editor = null ; } } // Destroy Paginator this . _destroyPaginator ( ) ; // Unhook custom events this . _oRecordSet . unsubscribeAll ( ) ; this . unsubscribeAll ( ) ; // Unhook DOM events Ev . removeListener ( document , "click" , this . _onDocumentClick ) ; // Clear out the container this . _destroyContainerEl ( this . _elContainer ) ; // Null out objects for ( var param in this ) { if ( lang . hasOwnProperty ( this , param ) ) { this [ param ] = null ; } } // Clean up static values DT . _nCurrentCount -- ; if ( DT . _nCurrentCount < 1 ) { if ( DT . _elDynStyleNode ) { document . getElementsByTagName ( 'head' ) [ 0 ] . removeChild ( DT . _elDynStyleNode ) ; DT . _elDynStyleNode = null ; } } YAHOO . log ( "DataTable instance destroyed: " + instanceName ) ; }
Nulls out the entire DataTable instance and related objects, removes attached
event listeners, and clears out DOM elements inside the container. After
calling this method, the instance reference should be expliclitly nulled by
implementer, as in myDataTable = null. Use with caution!

@method destroy
Nulls out the entire DataTable instance and related objects removes attached event listeners and clears out DOM elements inside the container . After calling this method the instance reference should be expliclitly nulled by implementer as in myDataTable = null . Use with caution!