Tear down this object, after we've agreed to close
        with the server.
353277
def _do_close(self):
        """"""
        AMQP_LOGGER.debug('Closed channel #%d', self.channel_id)
        self.is_open = False
        channel_id, self.channel_id = self.channel_id, None
        connection, self.connection = self.connection, None
        if connection:
            connection.channels.pop(channel_id, None)
            connection._avail_channel_ids.append(channel_id)
        self.callbacks.clear()
        self.cancel_callbacks.clear()
        self.events.clear()
        self.no_ack_consumers.clear()
307269
def close(self):
        
        if self._server is None:
            raise RuntimeError('Server is not started')
        self._server.close()
        for handler in self._handlers:
            handler.close()
266671
function destroyServer(server, topology, callback) {
  LOCAL_SERVER_EVENTS.forEach(event => server.removeAllListeners(event));

  server.destroy(() => {
    topology.emit(
      'serverClosed',
      new monitoring.ServerClosedEvent(topology.s.id, server.description.address)
    );

    if (typeof callback === 'function') callback(null, null);
  });
}
1274438
public void destroy()
    {
        if (_realIn!=null)
            _realIn.destroy();
        _realIn=null;
        _deChunker=null;
        _expectContinues=null;
    }
982176
def close(self):
        
        self.sasl.mechanism.destroy()
        self.sasl_client.get_client().destroy()
        self._underlying_xio.destroy()
480503
@Override
    public void destroy() {
        synchronized (channels) {
            isCurrentlyShutingDown = true;
            for (final SynchronizeFXTomcatChannel server : channels.values()) {
                server.shutdown();
            }
            servers.clear();
            channels.clear();
            isCurrentlyShutingDown = false;

        }
    }
729519
private void tearDownShiro()
  {
    try
    {
      SecurityManager securityManager = SecurityUtils.getSecurityManager();

      LifecycleUtils.destroy(securityManager);
      ThreadContext.unbindSecurityManager();
      ThreadContext.unbindSubject();
      ThreadContext.remove();
    }
    catch (UnavailableSecurityManagerException e)
    {

      // we don't care about this when cleaning up the test environment
      // (for example, maybe the subclass is a unit test and it didn't
      // need a SecurityManager instance because it was using only mock Subject instances)
    }

    SecurityUtils.setSecurityManager(null);
  }
1060398
def _destroy_server(self, server_name):
        """"""
        try:
            del self.servers[server_name]
        except KeyError:
            pass

        if self.auto_close and not self.servers:
            loop.stop()
73565
function() {

    debug('shutting down...');

    var app = this;
    var server = this.server;

    if (!server) return Promise.resolve();

    return co.wrap(function* () {
      yield this.hookFor('shutdown');
    }).call(this).then(function() {
      server.close(function() { debug('goodbye!'); });
    });

  }
1125763
void destroy() {
        for (DistributedObjectFuture future : proxies.values()) {
            if (!future.isSetAndInitialized()) {
                continue;
            }

            DistributedObject distributedObject = extractDistributedObject(future);
            invalidate(distributedObject);
        }
        proxies.clear();
    }
632914
def teardown(self):
        '''
        
        '''
        self.monitor_thread.stop()
        self.monitor_thread = None
        super(BaseMonitor, self).teardown()
1131652
private void destroy() {
        if (queue != null) {

            if (!queue.isEmpty()) {
                logger.trace("Non-empty queue: {}", queue);

                if (releaseMessages) {
                    Object msg;
                    while ((msg = queue.poll()) != null) {
                        ReferenceCountUtil.safeRelease(msg);
                    }
                }
            }

            queue.recycle();
            queue = null;
        }
    }
563968
def close(self):
        
        if self._publish:
            self._events.put((self._listener.publish_server_closed,
                              (self._description.address, self._topology_id)))
        self._monitor.close()
        self._pool.reset()
403324
public void destroy()
    {
        if (_packet!=null)
            _packet.destroy();
        _packet=null;
        if (_ajpResponse!=null)
            _ajpResponse.destroy();
        _ajpResponse=null;
        _out=null;
    }
90330
@Override
    public void destroy()
    {
        close();

        URLConnection conn = _conn;
        _conn = null;

        if (conn instanceof HttpURLConnection)
            ((HttpURLConnection) conn).disconnect();
    }
230010
public function teardown() {
        $this->setStatus(JobStatus::COMPLETE);
        $this->duration = microtime(true) - $this->startTime;
    }
241602
function destroy()
    {
        if ( $this->ImageObjectRef === null )
            return;
        if ( is_resource( $this->ImageObject ) and get_resource_type( $this->ImageObject ) == 'gd' )
            ImageDestroy( $this->ImageObject );
        eZImageInterface::unregisterImage( $this->ImageObjectRef );
        unset( $this->ImageObject );
        $this->ImageObject = null;
        $this->ImageObjectRef = null;
    }