Destroy session data and remove cookie
542937
public function kill_session()
    {
        $this->plugins->exec_hook('session_destroy');

        $this->session->kill();
        $_SESSION = array('language' => $this->user->language, 'temp' => true, 'skin' => $this->config->get('skin'));
        $this->user->reset();
    }
346129
function destroy($id) {
		Cache::instance()->clear($id.'.@');
		setcookie(session_name(),'',strtotime('-1 year'));
		unset($_COOKIE[session_name()]);
		header_remove('Set-Cookie');
		return TRUE;
	}
957032
def clear_session_cookies(self):
        
        self._cookies_lock.acquire()
        try:
            for cookie in self:
                if cookie.discard:
                    self.clear(cookie.domain, cookie.path, cookie.name)
        finally:
            self._cookies_lock.release()
549056
protected function destroyApplication()
    {
        $this->client->resetPersistentVars();
        if (isset(\Yii::$app) && \Yii::$app->has('session', true)) {
            \Yii::$app->session->close();
        }
        // Close connections if exists
        if (isset(\Yii::$app) && \Yii::$app->has('db', true)) {
            \Yii::$app->db->close();
        }
    }
32432
function destroy() {
    var key = Object.keys(terms)
      , i = key.length
      , term;

    while (i--) {
      term = terms[key[i]];
      delete terms[key[i]];
      term.destroy();
    }

    if (sessions[self.id]) {
      delete sessions[self.id];
    }

    self.log('Killing all pty\'s.');
  }
390865
public static function destroy2()
    {
        if (self::status() === \PHP_SESSION_ACTIVE) {
            //session_unset();
            self::flush();
            session_destroy();
            session_write_close();

            // TODO : utiliser 42000 comme nombre au lieu de -1heure => https://github.com/odan/slim-session/blob/master/src/Slim/Session/Adapter/PhpSessionAdapter.php#L39
            // delete the session cookie => lifetime = -1h (60 * 60)
            if (ini_get('session.use_cookies')) {
                $params = session_get_cookie_params();
                setcookie(
                    session_name(),
                    '',
                    time() - 3600,
                    $params['path'],
                    $params['domain'],
                    $params['secure'],
                    $params['httponly']
                );
            }
        }

        //return $this->clear(false);
    }
850838
def remove_session(self, session):
        
        try:
            del session.redis
        except AttributeError:
            pass
        try:
            del session.index_new[self.cls_name]
            del session.index_dirty[self.cls_name]
            del session.index_deleted[self.cls_name]
        except (AttributeError, KeyError):
            log.warning('Removing a session that has no indexing sets.')
        self.sessions.remove(session)
927915
function clear() {
  // TODO: Only remove used items
  data = {};
  if (localExists()) {
    try {
      // Clear session storage
      window.sessionStorage.clear();
    } catch (error) {
      _logger2.default.warn({
        description: 'Session storage could not be cleared.', error: error,
        obj: 'storage', func: 'removeItem'
      });
    }
  }
}
394010
public function destroy()
    {
        session_start();

        if(ini_get("session.use_cookies"))
        {
            $params = session_get_cookie_params();
            setcookie(session_name(),
                      '',
                      time() - 42000,
                      $params["path"],
                      $params["domain"],
                      $params["secure"],
                      $params["httponly"]
            );
        }

        session_unset();
        session_regenerate_id(true);
        session_destroy();
        session_write_close();
    }
321809
public function destroy()
	{
		// delete the session cookie
		\Cookie::delete($this->config['cookie_name'], $this->config['cookie_path'], $this->config['cookie_domain'], null, $this->config['cookie_http_only']);

		// reset the stored session data
		$this->keys = $this->flash = $this->data = array();

		return $this;
	}
297929
public function cleanupSession()
    {
        if ($this->userSession) {
            $this->resetDriver();
            $this->createRequest('delete', "/user/sessions/{$this->userSession->sessionId}");
            $this->restDriver->setHeader('cookie', "{$this->userSession->sessionName}={$this->userSession->sessionId}");
            $this->restDriver->setHeader('x-csrf-token', $this->userSession->csrfToken);
            $this->sendRequest();
            $this->userSession = null;
        }
    }
913485
public static function DestroyAll () {
		session_destroy();
		$_SESSION = NULL;
		static::$started = FALSE;
		$response = & \MvcCore\Application::GetInstance()->GetResponse();
		if (!$response->IsSent()) {
			$params = (object) session_get_cookie_params();
			$response->DeleteCookie(
				session_name(),
				$params->path,
				$params->domain,
				$params->secure
			);
		}
	}
281064
protected function sessionRestore()
	{
		if (isset($_SESSION[get_class($this)][$this->id]))
		{
			$this->unpackData($_SESSION[get_class($this)][$this->id]);
			unset($_SESSION[get_class($this)][$this->id]);
		}
	}
177395
public function destroySession()
    {
        if ($this->_is_session_initialized) {
            $_SESSION = array();
            if (isset($_COOKIE[$this->name])) {
                setcookie($this->name/*session_name()*/, '', time() - 42000, '/');
            }
            session_destroy();
            $this->_is_session_initialized = false;
        }
    }
1286283
static function cleanup()
    {
        $http = eZHTTPTool::instance();

        $http->removeSessionVariable( 'CanInstantiateClassList' );
        $http->removeSessionVariable( 'ClassesCachedForUser' );

        // Note: This must be done more generic with an internal
        //       callback system.
        eZPreferences::sessionCleanup();
    }
889100
public function destroy()
    {
        if (empty($this->sessionToken)) return;

        $this->userData = array();

        $this->handler->destroy($this->sessionToken);

        setcookie($this->sessionCookieName, null, $this->sessionExpiration, '/');

        $this->sessionToken = NULL;
    }
274689
def delete_cookie(self, key, path='/', domain=None):
        
        self.set_cookie(key, value='', max_age=0, path=path, domain=domain,
                        expires=datetime.utcfromtimestamp(0))