Clean up any events or objects created by the tracker.
@function
779774
function () {
            var i;

            stopTracking( this );
            this.element = null;

            for ( i = 0; i < MOUSETRACKERS.length; i++ ) {
                if ( MOUSETRACKERS[ i ] === this ) {
                    MOUSETRACKERS.splice( i, 1 );
                    break;
                }
            }

            THIS[ this.hash ] = null;
            delete THIS[ this.hash ];
        }
683098
function () {
        var cleanup = function () {
            u.off(this.element,'transitionend', cleanup);
            // this.element.removeEventListener('transitionend', cleanup);
            u.off(this.element,'webkitTransitionEnd', cleanup);
            // this.element.removeEventListener('webkitTransitionEnd', cleanup);
            u.removeClass(this.element, 'is-animating');
        }.bind(this);

        // Remove animation class once the transition is done.
        u.on(this.element,'transitionend', cleanup);
        // this.element.addEventListener('transitionend', cleanup);
        u.on(this.element,'webkitTransitionEnd', cleanup);
        // this.element.addEventListener('webkitTransitionEnd', cleanup);
    }
1204932
function cleanup()
    {
        // destroy loop variable(s)
        foreach ( $this->LoopVariablesNames as $varName )
            $this->Tpl->unsetVariable( $varName, $this->RootNamespace );
    }
673385
public function cleanup()
    {
        // unlock everything
        foreach ($this->locks as $lock) {
            flock($lock, LOCK_UN);
            fclose($lock);
        }

        $this->locks = [];
    }
154428
function clearEventHandlers($event = null)
	{
		if (!empty($event)) {
			$this->_events[$event] = array();
		}
		else {
			$this->_events = array();
		}
	}
970225
function cleanup( $process, $event )
    {
        $theGateway = $this->getCurrentGateway( $event );
        if( $theGateway != null and $theGateway->needCleanup() )
        {
            $theGateway->cleanup( $process, $event );
        }
    }
174568
private function cleanup(): void
    {

        CharacterBlueprint::where('character_id', $this->getCharacterId())
            ->whereNotIn('item_id', $this->cleanup_ids->flatten()->unique()->all())
            ->delete();
    }
839347
function cleanup() {
      res.removeListener('finish', makePoint);
      res.removeListener('error', cleanup);
      res.removeListener('close', cleanup);
    }
469016
public static function cleanup() {
        global $DB;

        // Clean up stuff that depends on contexts that do not exist anymore.
        $sql = "SELECT DISTINCT ap.contextid FROM {analytics_predictions} ap
                  LEFT JOIN {context} ctx ON ap.contextid = ctx.id
                 WHERE ctx.id IS NULL";
        $apcontexts = $DB->get_records_sql($sql);

        $sql = "SELECT DISTINCT aic.contextid FROM {analytics_indicator_calc} aic
                  LEFT JOIN {context} ctx ON aic.contextid = ctx.id
                 WHERE ctx.id IS NULL";
        $indcalccontexts = $DB->get_records_sql($sql);

        $contexts = $apcontexts + $indcalccontexts;
        if ($contexts) {
            list($sql, $params) = $DB->get_in_or_equal(array_keys($contexts));
            $DB->execute("DELETE FROM {analytics_prediction_actions} WHERE predictionid IN
                (SELECT ap.id FROM {analytics_predictions} ap WHERE ap.contextid $sql)", $params);

            $DB->delete_records_select('analytics_predictions', "contextid $sql", $params);
            $DB->delete_records_select('analytics_indicator_calc', "contextid $sql", $params);
        }

        // Clean up stuff that depends on analysable ids that do not exist anymore.
        $models = self::get_all_models();
        foreach ($models as $model) {
            $analyser = $model->get_analyser(array('notimesplitting' => true));
            $analysables = $analyser->get_analysables_iterator();

            $analysableids = [];
            foreach ($analysables as $analysable) {
                if (!$analysable) {
                    continue;
                }
                $analysableids[] = $analysable->get_id();
            }
            if (empty($analysableids)) {
                continue;
            }

            list($notinsql, $params) = $DB->get_in_or_equal($analysableids, SQL_PARAMS_NAMED, 'param', false);
            $params['modelid'] = $model->get_id();

            $DB->delete_records_select('analytics_predict_samples', "modelid = :modelid AND analysableid $notinsql", $params);
            $DB->delete_records_select('analytics_train_samples', "modelid = :modelid AND analysableid $notinsql", $params);
        }
    }
141991
def clean_previous_run(self):
        
        # Execute the base class treatment...
        super(Satellite, self).clean_previous_run()

        # Clean my lists
        del self.broks[:]
        del self.events[:]
542142
function() {
		gui.Plugin.prototype.ondestruct.call(this);
		gui.Object.each(this._trackedtypes, function(type, list) {
			list.slice().forEach(function(checks) {
				this._cleanup(type, checks);
			}, this);
		}, this);
	}
912940
function cleanup (dirs) {
  return function (mode, pass, callback) {
    var done = after(dirs.length, callback)

    dirs.forEach(function (dir) {
      rimraf(dir, done)
    })
  }
}
744969
public function clean()
    {
        foreach ( $this->createdObjects as $object )
        {
            $this->destroy( $object );
        }

        $this->createdObjects = array();
    }
7675
function(target, events) {
      for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {
        this.removeEvent(target, e);
      }
    }
592042
protected function cleanup()
    {
        // if $this->fs is an object, the Filesystem has been used, clean it up.
        if (is_object($this->fs)) {
            if ($this->fs->isDirectory($this->tempPath)) {
                $this->fs->deleteDirectory($this->tempPath, false);
            }
        }
    }
493767
function resetTracker() {
			var hoverSeries = chart.hoverSeries,
				hoverPoint = chart.hoverPoint;

			if (hoverPoint) {
				hoverPoint.onMouseOut();
			}

			if (hoverSeries) {
				hoverSeries.onMouseOut();
			}

			if (tooltip) {
				tooltip.hide();
			}

			hoverX = null;
		}
471781
function(object, events, callback) {
      var listeners = this._listeners;
      if (!listeners) return;
      if (object) {
        object.off(events, callback, this);
        if (!events && !callback) delete listeners[object._listenerId];
      } else {
        for (var id in listeners) {
          listeners[id].off(null, null, this);
        }
        this._listeners = {};
      }
      return this;
    }