Called by PresentsSession to let us know that we can clear it entirely out of the system.
1872
protected void clearSession (PresentsSession session)
    {
        // remove the session from the username map
        PresentsSession rc;
        synchronized (_usermap) {
            rc = _usermap.remove(session.getAuthName());
        }

        // sanity check just because we can
        if (rc == null) {
            log.info("Cleared session: unregistered!", "session", session);
        } else if (rc != session) {
            log.info("Cleared session: multiple!", "s1", rc, "s2", session);
        } else {
            log.info("Cleared session", "session", session);
        }
    }
1283476
public void clear ()
    {
        _modCount++;

        // abandon all of our hash chains (the joy of garbage collection)
        for (int i = 0; i < _buckets.length; i++) {
            _buckets[i] = null;
        }
        // zero out our size
        _size = 0;
    }
352156
function() {

        if (purging) {
            return;
        }

        purging = true;
        for (var i in queues) {
            var q = queues[i];
            if (q.autopurge && q.finished) {
                _purge(q.tId);
                delete queues[i];
            }
        }

        purging = false;
    }
437425
def clear_data(self, request):
        
        for key in request.session.keys():
            if key.startswith(constants.SESSION_KEY):
                del request.session[key]
977247
private void cleanupSession(){
        eventThread.queueClientEvent(new ClientSessionEvent(SessionEvent.CLOSED));
        watcherManager.cleanup();
        session.id = "";
        session.password = null;
        session.serverId = -1;
        onSessionClose();
    }
1138717
def clear(self):
        """"""

        while True:
            try:
                session = self._sessions.get(block=False)
            except queue.Empty:
                break
            else:
                session.delete()
805656
def cleanup(self):
        
        if getattr(self._finalizer, "detach", None) and self._finalizer.detach():
            if os.path.exists(self.path):
                try:
                    rmtree(self.path)
                except OSError:
                    pass
                else:
                    self.path = None
1280734
def clear(self):
        
        self.mark_incomplete()
        session = client.get_client().create_session()

        movies = session.query(models.Movie)
        movies.update({'budget_inflation_adjusted': None})

        session.commit()
        session.close()
69453
def clean(self):
        
        if self._initialized:
            logger.info("brace yourselves, removing %r", self.path)
            shutil.rmtree(self.path)
1312227
function confirmClear() {
        var promptSchema = {
            properties: {
                confirm: {
                    description: 'Delete everything in the ' + config.env.toUpperCase() + ' database? (y or n) ',
                    pattern: /^[yn]$/,
                    message: 'Please respond with y or n. ',
                    required: true
                }
            }
        };

        // for safety reasons, we can't use this in production
        if (config.env === 'production') {
            return Q.reject('purging is NOT available for prod.');
        }

        // prompt the user to confirm they are deleting everything in the database
        var deferred = Q.defer();
        prompt.start();
        prompt.get(promptSchema, function (err, result) {
            if (err) {
                deferred.reject(err);
            }
            else if (result.confirm !== 'y') {
                log.info('purge cancelled');
                deferred.resolve(false);
            }
            // else user confirmed deletion so do it
            else {
                deferred.resolve(true);
            }
        });

        return deferred.promise;
    }
852521
public void terminateSession(final SipSession session,
    							 final int calleeResponseCode, final String calleeResponseText,
    							 final int callerResponseCode, final String callerResponseText)
    							 throws IllegalStateException, IOException {
    	if(null == finalBranchForSubsequentRequests) {
			throw new IllegalStateException("Proxy has not yet been established. Before final response use cancel.");
    	}
    	if (!storeTerminationInfo || terminationInfo == null) {
    		logger.error("storeTerminationInfo = " + storeTerminationInfo);
    		if (terminationInfo == null) {
    			logger.error("terminationInfo = null");
    		}
    		throw new IllegalStateException("No termination information stored.Call storeTerminationInformation before final response arrives.");
    	}
    	terminationInfo.terminate(session, calleeResponseCode, calleeResponseText, callerResponseCode, callerResponseText);
    }
419367
public function handleLogoutTryRole(): void
	{
		if (!empty($this->id)) {
			unset($this->session[$this->id]);
			$this->id = null;
		}
		$this->presenter->redirect('this');
	}
666704
private void free(IoSession session) {
        IoBuffer buf = buffersMap.remove(session);
        if (buf != null) {
            buf.free();
        }
    }
144046
def clear(self, session):
        
        try:
            sess = self.sessions[session]
        except KeyError:
            return constants.StatusCode.error_invalid_object
        return sess.clear()
1285538
function handleFileDelete() {
        var entry = ProjectManager.getSelectedItem();
        Dialogs.showModalDialog(
            DefaultDialogs.DIALOG_ID_EXT_DELETED,
            Strings.CONFIRM_DELETE_TITLE,
            StringUtils.format(
                entry.isFile ? Strings.CONFIRM_FILE_DELETE : Strings.CONFIRM_FOLDER_DELETE,
                StringUtils.breakableUrl(entry.name)
            ),
            [
                {
                    className : Dialogs.DIALOG_BTN_CLASS_NORMAL,
                    id        : Dialogs.DIALOG_BTN_CANCEL,
                    text      : Strings.CANCEL
                },
                {
                    className : Dialogs.DIALOG_BTN_CLASS_PRIMARY,
                    id        : Dialogs.DIALOG_BTN_OK,
                    text      : Strings.DELETE
                }
            ]
        )
            .done(function (id) {
                if (id === Dialogs.DIALOG_BTN_OK) {
                    ProjectManager.deleteItem(entry);
                }
            });
    }
1132716
public function clear()
    {
        $this->session->remove($this->getSessionKey());
        $this->session->remove($this->getSessionExtraKey());
        $this->session->remove($this->getSessionTargetPathKey());
    }
1308364
private void invalidateAllMemorySessions() {

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[INVALIDATE_ALL_MEMORY_SESSIONS], appNameForLogging);
        }

        Set s = _sessions.keySet();
        if (s != null) {
            for (Iterator it = s.iterator(); it.hasNext();) {
                MemorySession ms = (MemorySession) _sessions.get(it.next());
                ms.internalInvalidate(false);
            }
        }
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[INVALIDATE_ALL_MEMORY_SESSIONS]);
        }
    }