Closes this index, releasing all held resources.
338260
synchronized void close()
   {
      releaseWriterAndReaders();
      if (directory != null)
      {
         try
         {
            directory.close();
         }
         catch (IOException e)
         {
            directory = null;
         }
      }
   }
866345
@Override
    public void close()
    {
        this.indexManager.flush();
        if (s != null)
        {
            s.close();
            s = null;
        }
        externalProperties = null;
    }
229228
public void close ()
        throws IOException
    {
        if (_sock != null) {
            _sock.close();

            // clear out our references
            _sock = null;
            _in = null;
            _out = null;
        }
    }
263110
public void close()
  {
    StreamSource ss = _indirectSource;
    _indirectSource = null;
    
    if (ss != null) {
      ss.freeUseCount();
    }
    else {
      freeUseCount();
    }
  }
1020167
public void close() {
    if (indexManager != null)
      indexManager.flush();
    if (schema != null)
      schema.close();
    if (security != null)
      security.close();
  }
821839
public static void shutdown()
    {
        synchronized(lock) {
            for(Iterator it = loadedHMs.iterator(); it.hasNext();)
            {
                ((HashMap) it.next()).clear();
            }
            loadedHMs.clear();
            loadedHMs = null;
        }
        currentBrokerMap = null;
    }
1288752
@SuppressWarnings("unchecked")
	public void close() throws IOException {
		if(itr instanceof CloseableIterator) {
			CloseableIterator<E> toBeClosed = (CloseableIterator<E>) itr;
			toBeClosed.close();
		}
	}
160733
public void close() {
        if (running) {
            taskPool.clear();
            running = false;
            for (PoolThread thread : threadPool) {
                thread.interrupt();
            }
        }
    }
1205908
void close() {

        try {
            clearLock();
            m_context.finish(Collections.singletonList(m_resource.getStructureId()));
        } catch (CmsException e) {
            m_context.error(e);
        }
    }
149113
protected void close() throws IOException {
        synchronized(fdLock) {
            if (fd != null && fd.valid()) {
                if (!stream) {
                    ResourceManager.afterUdpClose();
                }
                if (closePending) {
                  return;
                }
                closePending = true;
                socketClose();
                return;
            }
        }
    }
533266
@Override
	public synchronized void close() {
		Set<IXADataRecorder> recoveredXADataRecorders = this.getRecoveredXADataRecorders();
		for (IXADataRecorder dataRecorder : recoveredXADataRecorders) {
			dataRecorder.disqualify();			
		}
	}
712551
@Override
  public void close() throws IOException {
    if (open.compareAndSet(true, false)) {
      onClose.run();

      Throwable thrown = null;
      do {
        for (Closeable resource : resources) {
          try {
            resource.close();
          } catch (Throwable e) {
            if (thrown == null) {
              thrown = e;
            } else {
              thrown.addSuppressed(e);
            }
          } finally {
            // ensure the resource is removed even if it doesn't remove itself when closed
            resources.remove(resource);
          }
        }

        // It's possible for a thread registering a resource to register that resource after open
        // has been set to false and even after we've looped through and closed all the resources.
        // Since registering must be incremented *before* checking the state of open, however,
        // when we reach this point in that situation either the register call is still in progress
        // (registering > 0) or the new resource has been successfully added (resources not empty).
        // In either case, we just need to repeat the loop until there are no more register calls
        // in progress (no new calls can start and no resources left to close.
      } while (registering.get() > 0 || !resources.isEmpty());
      Throwables.propagateIfPossible(thrown, IOException.class);
    }
  }
891249
def close(self):
        
        self._handle.remove()
        self._node_monitor_event_handle.remove()
        self._allocation_table.close()
1354297
@Override
  public void close()
  {
    super.close();
    facts.clear();
    indexAndOffsets.clear();

    if (selectors != null) {
      selectors.clear();
    }

    Closer c = Closer.create();
    aggBuffers.forEach(c::register);
    try {
      c.close();
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
    aggBuffers.clear();
  }
546493
private function _close()
    {
        if ($this->_closed) {
            // index is already closed and resources are cleaned up
            return;
        }

        $this->commit();

        // Release "under processing" flag
        Zend_Search_Lucene_LockManager::releaseReadLock($this->_directory);

        if ($this->_closeDirOnExit) {
            $this->_directory->close();
        }

        $this->_directory    = null;
        $this->_writer       = null;
        $this->_segmentInfos = null;

        $this->_closed = true;
    }
829756
void close() {
        synchronized (pxmlsInfo) {
            for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
                pxmlInfo.close();
            }
            pxmlsInfo.clear();
        }
    }
651838
def destroy_index(self):
        
        self.close()
        logger.info("Destroying the index ...")
        rm_rf(self.indexdir)
        rm_rf(self.label_guesser_dir)
        logger.info("Done")