Close and destroy the object.

    This is similar to Flush, but does not maintain object validity. Hence the
    object should not be interacted with after Close().

    Raises:
       LockError: The lease for this object has expired.
965744
def Close(self):
    
    if self.locked and self.CheckLease() == 0:
      raise LockError("Can not update lease that has already expired.")

    self._WriteAttributes()

    # Releasing this lock allows another thread to own it.
    if self.locked:
      self.transaction.Release()

    if self.parent:
      self.parent.Close()

    # Interacting with a closed object is a bug. We need to catch this ASAP so
    # we remove all mode permissions from this object.
    self.mode = ""
955875
def close(self):
        
        with self.stop_lock:
            self.stopped = True

        return ioloop_util.submit(self._flush, io_loop=self.io_loop)
273418
def close(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.close(index=self._name, **kwargs)
345488
def _Close(self):
    
    if not self._file_object_set_in_init:
      self._file_object.close()
      self._file_object = None

    self._decrypter = None
    self._decrypted_data = b''
    self._encrypted_data = b''
721547
def close(self):
        
        # This may not be absolutely necessary, but it is safe.
        # It's the closest thing to a close() method.
        if self._dev is not None:
            usb.util.dispose_resources(self._dev)
            self._dev = None
213084
def close(self):
        
        try:
            self.connection.close()
            self.connection = None
        except Exception:
            if not self.fail_silently:
                raise
565283
def close(self):
        
        self.closed = True
        signal = _allocate_lock()
        signal.acquire()
        self.queue.add(CommandItem(COMMIT, None, signal, None, None))
        signal.acquire()
        self.worker.please_stop.go()
        return
404980
def dispose(self):
    
    self._lock.acquire()
    self._events_writer.Close()
    self._events_writer = None
    self._lock.release()
601846
def Close(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not self._is_cached:
      close_file_system = True
    elif self._resolver_context.ReleaseFileSystem(self):
      self._is_cached = False
      close_file_system = True
    else:
      close_file_system = False

    if close_file_system:
      self._Close()
      self._is_open = False
      self._path_spec = None
708455
def close(self):
        
        if self.closed is False:
            self.clean()
            try:
                self.writer.write_eof()
            except:
                pass
            self.writer.close()
            self.closed = True
            if self.debug is True:
                print('close')
        if self.debug is True:
            print("closed")
968801
def destroy
      run_callbacks(:before_destroy)
      new_data = self.class.all.reject { |item| item.persisted_attributes == self.persisted_attributes }.map { |item| item.persisted_attributes }
      self.class.write_contents(new_data)
      self.is_destroyed = true
      run_callbacks(:after_destroy)
      true
    rescue IOError
      false
    end
37309
def close(self):
        
        if self._closed:
            return defer.succeed(None)

        def ok(_):
            self._closed = True
        return self.__flush().addCallback(ok)
831269
def close(self):
        
        # Disable access to the pool
        old_pool, self.pool = self.pool, None

        try:
            while True:
                conn = old_pool.get(block=False)
                if conn:
                    conn.close()

        except queue.Empty:
            pass
514402
def close_session(self, commit=True):
        
        if self._session is not None:
            if commit:
                self._session.commit()
            self._session.close()
            self._session = None
185025
def close(self):
        
        self.result_set = None
        if self.impl is not None:
            self.impl._reset()
        self.impl = None
1321350
def close(self, *, commit=True):
    
    self.core.close(self.connection, commit=commit)
    self.connection = None
    return self
226277
def close(self):
        
        for obj in self._temp_objects:
            try:
                obj.drop()
            except HS2Error:
                pass

        self.con.close()