// Destroy destroys the window.
// (https://wiki.libsdl.org/SDL_DestroyWindow)
8039
func (window *Window) Destroy() error {
	lastErr := GetError()
	ClearError()
	C.SDL_DestroyWindow(window.cptr())
	err := GetError()
	if err != nil {
		return err
	}
	SetError(lastErr)
	return nil
}
172625
func (s *Session) Destroy() error {
	if s.m == nil {
		return ErrNotPassMiddleware
	}
	return s.m.Destroy(s)
}
158605
func (w *window) close() {
	w.L.Lock()
	w.closed = true
	w.Broadcast()
	w.L.Unlock()
}
586885
func (_class VLANClass) Destroy(sessionID SessionRef, self VLANRef) (_err error) {
	_method := "VLAN.destroy"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVLANRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg)
	return
}
201838
func (n *Node) Destroy() {
	n.state.Lock()
	if n.state.destroyed {
		n.state.Unlock()
		return
	}
	n.state.destroyed = true
	n.state.Unlock()

	n.Stop()
}
349523
func (instanceApi *InstanceApi) Destroy(id string, purge bool) (bool, error) {
	send, merr := json.Marshal(DestroyOptions{
		PurgeImmediately: purge,
	})
	if merr != nil {
		return false, merr
	}
	_, err := instanceApi.entityService.Delete(id, send, map[string]string{})
	return err == nil, err
}
1202006
func (s *Session) Destroy(ctx context.Context) error {
	sd := s.getSessionDataFromContext(ctx)

	sd.mu.Lock()
	defer sd.mu.Unlock()

	err := s.Store.Delete(sd.token)
	if err != nil {
		return err
	}

	sd.status = Destroyed

	// Reset everything else to defaults.
	sd.token = ""
	sd.Deadline = time.Now().Add(s.Lifetime).UTC()
	for key := range sd.Values {
		delete(sd.Values, key)
	}

	return nil
}
50941
func (w *Window) Kill() {
	xproto.KillClient(w.X.Conn(), uint32(w.Id))
}
1298866
func (p *provider) Destroy(sid string) {
	p.mu.Lock()
	if sess, found := p.sessions[sid]; found {
		p.deleteSession(sess)
	}
	p.mu.Unlock()
}
764870
func (d *AllocDir) Destroy() error {
	// Unmount all mounted shared alloc dirs.
	var mErr multierror.Error
	if err := d.UnmountAll(); err != nil {
		mErr.Errors = append(mErr.Errors, err)
	}

	if err := os.RemoveAll(d.AllocDir); err != nil {
		mErr.Errors = append(mErr.Errors, fmt.Errorf("failed to remove alloc dir %q: %v", d.AllocDir, err))
	}

	// Unset built since the alloc dir has been destroyed.
	d.mu.Lock()
	d.built = false
	d.mu.Unlock()
	return mErr.ErrorOrNil()
}
624125
func (opts *UniversalCompactionOptions) Destroy() {
	C.rocksdb_universal_compaction_options_destroy(opts.c)
	opts.c = nil
}
698964
func (w *Window) Destroy() (err error) {
	if err = w.isActionable(); err != nil {
		return
	}
	_, err = synchronousEvent(w.c, w, w.w, Event{Name: EventNameWindowCmdDestroy, TargetID: w.id}, EventNameWindowEventClosed)
	return
}
341057
func (s *appsService) Destroy(ctx context.Context, db *gorm.DB, app *App) error {
	if err := appsDestroy(db, app); err != nil {
		return err
	}

	return s.Scheduler.Remove(ctx, app.ID)
}
637353
func (c *cniProcessor) Destroy(ctx context.Context, eventInfo *common.EventInfo) error {
	return nil
}
719687
func (a *adapter) Destroy(app string) error {
	// Check first if the map of ringBuffer pointers even contains the ringBuffer we intend to
	// delete so we can avoid waiting for / obtaining a lock unnecessarily
	_, ok := a.ringBuffers[app]
	if ok {
		a.mutex.Lock()
		defer a.mutex.Unlock()
		delete(a.ringBuffers, app)
	}
	return nil
}
496792
func (db *PGStore) destroy(session *sessions.Session) error {
	_, err := db.DbPool.Exec("DELETE FROM http_sessions WHERE key = $1", session.ID)
	return err
}
277564
func (w *Window) Close() bool {
	if !w.CloseAllViews() {
		return false
	}
	GetEditor().remove(w)

	return true
}