Destroy all tabs when destroyed
18539
def destroy(self):
        
        super(AndroidTabLayout, self).destroy()
        if self.tabs:
            del self.tabs
405254
def close_tab(self, *args):
        
        prompt_cfg = self.settings.general.get_int('prompt-on-close-tab')
        self.get_notebook().delete_page_current(prompt=prompt_cfg)
1288729
def destroy_channels(self):
        """"""
        for item_name in dir(self):
            item = getattr(self, item_name)
            if isinstance(item, self.RedisAtomicBase):
                self.redis.delete(item.item_name)
427963
function() {
        for (var i=0, len=this.rules.length; i<len; i++) {
            this.rules[i].destroy();
        }
        delete this.rules;
    }
69562
function destroy() {
			// Destroy the tracker group element
			if (chart.trackerGroup) {
				chart.trackerGroup = trackerGroup = chart.trackerGroup.destroy();
			}

			removeEvent(doc, 'mousemove', hideTooltipOnMouseMove);
			container.onclick = container.onmousedown = container.onmousemove = container.ontouchstart = container.ontouchend = container.ontouchmove = null;
		}
703504
def close_others(self):
        
        current_widget = self.currentWidget()
        self._try_close_dirty_tabs(exept=current_widget)
        i = 0
        while self.count() > 1:
            widget = self.widget(i)
            if widget != current_widget:
                self.removeTab(i)
            else:
                i = 1
1209531
function destroy() {
                this.onDestroy();
                this.eventBus.clear();
                while (this._events.length > 0) {
                    this._events.shift().remove();
                }

                while (this._globalEvents.length > 0) {
                    this._globalEvents.shift().remove();
                }

                _destroy(this.children);

                if (this.elGroup !== undefined && this.el !== undefined) {
                    this.elGroup.delete(this.el);
                }
                if (this.root && this.root.remove) {
                    this.root.remove();
                }

                delete this.el;
            }
216001
function destroyRenderedElems(oldElems) {
        if (!oldElems) {
            return;
        }
        oldElems.forEach(function (oldElem) {
            if (!oldElem) {
                return;
            }
            var destroyEvent = customEvent('grid-rendered-elem-destroy', true);
            oldElem.dispatchEvent(destroyEvent);
        });
    }
781088
function (index, destroy) {
                var self = this, bar = /**
             @ignore
             @type KISSY.Component.Control
             */
                    self.get('bar'), barCs = bar.get('children'), tab = bar.getChildAt(index), body = /**
             @ignore
             @type KISSY.Component.Control
             */
                    self.get('body');
                if (tab.get('selected')) {
                    if (barCs.length === 1) {
                        bar.set('selectedTab', null);
                    } else if (index === 0) {
                        bar.set('selectedTab', bar.getChildAt(index + 1));
                    } else {
                        bar.set('selectedTab', bar.getChildAt(index - 1));
                    }
                }
                bar.removeChild(bar.getChildAt(index), destroy);
                body.removeChild(body.getChildAt(index), destroy);
                return self;
            }
425979
public function destroy()
    {
        // empty
        $_SESSION = array();

        // clear cookies from agent
        $signature = ($this->_name) . 'Signature';
            setcookie(
        $this->_name,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
            setcookie(
        $signature,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );

        /**
         * Clear out of global scope, since setcookie requires buffer flush
         * to update global <_COOKIE> array.
         */
            unset($_COOKIE[$this->_name]);
            unset($_COOKIE[$signature]);

        // destroy
            session_destroy();
    }
674008
function destroy() {
         me.pool.push(this.fontScale);
         this.fontScale = undefined;
         me.pool.push(this.fontData);
         this.fontData = undefined;

         this._super(me.Renderable, "destroy");
       }
109108
function() {
		if( this.isInitialised === false ) {
			return;
		}
		$( window ).off( 'resize', this._resizeFunction );
		this.root.callDownwards( '_$destroy', [], true );
		this.root.contentItems = [];
		this.tabDropPlaceholder.remove();
		this.dropTargetIndicator.destroy();
		this.transitionIndicator.destroy();
	}
1119813
def remove_tab(self, index):
        
        widget = self.widget(index)
        try:
            document = widget.document()
        except AttributeError:
            document = None  # not a QPlainTextEdit
        clones = self._close_widget(widget)
        self.tab_closed.emit(widget)
        self.removeTab(index)
        self._restore_original(clones)
        widget._original_tab_widget._tabs.remove(widget)
        if self.count() == 0:
            self.last_tab_closed.emit()
        if SplittableTabWidget.tab_under_menu == widget:
            SplittableTabWidget.tab_under_menu = None
        if not clones:
            widget.setParent(None)
        else:
            try:
                clones[0].syntax_highlighter.setDocument(document)
            except AttributeError:
                pass
907808
function addDestroyListener($scope, control, bindings, destroyed) {
        $scope.$on("$destroy", function () {
            (destroyed && destroyed());

            bindings.forEach(function (w) { w(); });

            if (control.dispose) {
                control.dispose();
            }
        });
    }
675618
function destroy() {
        ScrollSpy._elements.splice(ScrollSpy._elements.indexOf(this), 1);
        ScrollSpy._elementsInView.splice(ScrollSpy._elementsInView.indexOf(this), 1);
        ScrollSpy._visibleElements.splice(ScrollSpy._visibleElements.indexOf(this.$el), 1);
        ScrollSpy._count--;
        this._removeEventHandlers();
        $(this.options.getActiveElement(this.$el.attr('id'))).removeClass(this.options.activeClass);
        this.el.M_ScrollSpy = undefined;
      }
775073
function destroy() {
		var i,
			parentNode = container && container.parentNode;

		// If the chart is destroyed already, do nothing.
		// This will happen if if a script invokes chart.destroy and
		// then it will be called again on win.unload
		if (chart === null) {
			return;
		}

		// fire the chart.destoy event
		fireEvent(chart, 'destroy');

		// remove events
		// PATCH by Simon Fishel
        //
        // use event namespacing to avoid creating a circular reference
        // TODO: would be better to not rely on jQuery's event namespacing here
        //       since this code is no longer agnostic to the event library
        //
        // - removeEvent(win, 'unload', destroy);
        //
        // + removeEvent(win, '.' + containerId);
        
        removeEvent(win, '.' + containerId);
        
		removeEvent(chart);

		// ==== Destroy collections:
		// Destroy axes
		i = axes.length;
		while (i--) {
			axes[i] = axes[i].destroy();
		}

		// Destroy each series
		i = series.length;
		while (i--) {
			series[i] = series[i].destroy();
		}

		// ==== Destroy chart properties:
		each(['title', 'subtitle', 'seriesGroup', 'clipRect', 'credits', 'tracker'], function (name) {
			var prop = chart[name];

			if (prop) {
				chart[name] = prop.destroy();
			}
		});

		// ==== Destroy local variables:
		each([chartBackground, legend, tooltip, renderer, tracker], function (obj) {
			if (obj && obj.destroy) {
				obj.destroy();
			}
		});
		chartBackground = legend = tooltip = renderer = tracker = null;

		// remove container and all SVG
		if (container) { // can break in IE when destroyed before finished loading
			container.innerHTML = '';
			removeEvent(container);
			if (parentNode) {
				parentNode.removeChild(container);
			}

			// IE6 leak
			container = null;
		}

		// memory and CPU leak
		clearInterval(tooltipInterval);

		// clean it all up
		for (i in chart) {
			delete chart[i];
		}

		chart = null;
	}
363348
function (tab, destroy) {
                var index = util.indexOf(tab, this.get('bar').get('children'));
                return this.removeItemAt(index, destroy);
            }