Disposes the native part of this Wrapper. That is, calling Release on the interface pointer. After a wrapper is disposed,
every call to a COM method will raise an {@link IllegalStateException}
511479
public void dispose() {
        if(!isDisposed) {
            new Task<Void>() {
                public Void call() {
                    dispose0();
                    return null;
                }
            }.execute(thread); // Issue 39 fixed.
        }
    }
122468
public void dispose( DisposeHandler disposeHandler )
    {
        if ( disposeHandler == null )
        {
            disposeHandler = new NoOpDisposeHandler();
        }

        for ( Disposable disposable : disposables )
        {
            disposable.dispose( disposeHandler );
        }
    }
720751
@Override
    public void close() {
        if (this.closed.compareAndSet(false, true)) {
            // Clean up the map, just in case the caller still has a pointer to this object.
            this.map.clear();

            Consumer<String> callback = this.closeCallback;
            if (callback != null) {
                Callbacks.invokeSafely(callback, this.id, null);
            }
        }
    }
1120489
private void doRelease() {
        try {
            in.close();
        } catch (Exception ex) {
            if (log.isDebugEnabled())
                log.debug("FYI", ex);
        }
        if (in instanceof Releasable) {
            // This allows any underlying stream that has the close operation
            // disabled to be truly released
            Releasable r = (Releasable)in;
            r.release();
        }
        abortIfNeeded();
    }
1107054
@Override
    public void close() {
        if (unprocessed != null) {
            try {
                unprocessed.forEach(ByteBuf::release);
            } finally {
                unprocessed = null;
            }

            if (endOfStream) {
                listener.endOfStream();
            }
        }
    }
429259
@Override
    public void release() throws EEException {
        LOG.trace("Releasing Execution Engine... " + pointer);
        if (pointer != 0L) {
            final int errorCode = nativeDestroy(pointer);
            pointer = 0L;
            checkErrorCode(errorCode);
        }
        m_firstDeserializer = null;
        m_firstDeserializerBufferOrigin.discard();
        m_nextDeserializer = null;
        m_nextDeserializerBufferOrigin.discard();
        m_exceptionBuffer = null;
        m_exceptionBufferOrigin.discard();
        m_emptyDeserializer = null;
        m_emptyDeserializerBuffer.discard();
        m_psetBufferC.discard();
        m_psetBuffer = null;
        m_perFragmentStatsBufferC.discard();
        m_perFragmentStatsBuffer = null;
        m_udfBufferC.discard();
        m_udfBuffer = null;
        LOG.trace("Released Execution Engine.");
    }
353443
public void dispose() {
        logDebug("Disposing.");
        mSetupDone = false;
        if (mServiceConn != null) {
            logDebug("Unbinding from service.");
            if (mContext != null) mContext.unbindService(mServiceConn);
        }
        mDisposed = true;
        mContext = null;
        mServiceConn = null;
        mService = null;
        mPurchaseListener = null;
    }
1235086
@Override
    public void dispose() throws SimpleImageException {
        super.dispose();

        if (needClean) {
            if (stream != null) {
                try {
                    stream.flush();
                    stream.close();
                } catch (IOException e) {
                    throw new SimpleImageException(e);
                }
            }
        }

        this.stream = null;
        this.image = null;
        this.param = null;
    }
1151424
@Override
    protected void dispose() {
        try {
            if (generator != null) {
                generator.writeEndArray();
                generator.close();
            }
            this.getOutputStream().close();
        } catch (IOException ioe) {
            logger.error("Unable to close stream", ioe);
            logger.trace(ioe.getMessage(), ioe);
        } finally {
            generator = null;
            this.setOutputStream(null);
        }
    }
1268522
@Override
    public void destroy() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Destroying OSC: " + this);
        }
        // 291714 - clean up the VC statemap
        getVC().getStateMap().remove(CallbackIDs.CALLBACK_HTTPOSC);
        super.destroy();
        this.myLink = null;
        this.readException = null;
    }
1107909
@Override
    public void release(Pointer pointer, MemoryKind kind) {
        if (kind == MemoryKind.DEVICE) {
            NativeOpsHolder.getInstance().getDeviceNativeOps().freeDevice(pointer, 0);
            pointer.setNull();
        } else if (kind == MemoryKind.HOST) {
            NativeOpsHolder.getInstance().getDeviceNativeOps().freeHost(pointer);
            pointer.setNull();
        }
    }
872474
@Override
  public synchronized void dispose() {
    if (saslClient != null) {
      try {
        saslClient.dispose();
      } catch (SaslException e) {
        // ignore
      } finally {
        saslClient = null;
      }
    }
  }
438509
@Override
  public void close() {
    if (state == RELEASED) {
      return;
    }
    if (state == READY) {
      LIB.mdb_txn_abort(ptr);
    }
    keyVal.close();
    state = RELEASED;
  }
1022266
public void dispose() {
    try {
      if(sipProvider.getListeningPoints().length > 0)
          sipStack.deleteListeningPoint(sipProvider.getListeningPoints()[0]);
      sipProvider.removeSipListener(this);
      sipStack.deleteSipProvider(sipProvider);
      sipFactory.resetFactory();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
531495
private void internalRelease()
    {
        _facesContext = null;
        _componentInstance = null;
        _created = false;

        _childrenAdded = null;
        _facetsAdded = null;
    }
447324
@Override
    public void destroy() {
        try {
            super.destroy();
        } finally {
            if (myOwnKafkaClient && defaultKafkaClient != null) {
                try {
                    defaultKafkaClient.destroy();
                } catch (Exception e) {
                    LOGGER.warn(e.getMessage(), e);
                } finally {
                    defaultKafkaClient = null;
                }
            }
        }
    }
634836
@Override
    public void free() {
        try {
        if(hasCoreConnection()) {
            this.getCoreConnection().close();
        }
        this.fireConnectionFreed();
        this.boundThreadId= Thread.currentThread().getId();

    } finally {
        this.setClosed(true);
        // state may be important for State-Listener, so its set after the listener did their work
        setTransactionalData(false);

        // re-opem is not possible
        // this.connection=null;
        this.releaseThreadBinding();
    }

    }