If {@link #release(Object)} or {@link #releaseExceptionally(Throwable)} has been called it
resets the object into the unreleased state. If release has not been called this will have no effect.
162096
public void reset() {
        synchronized (lock) {
            released = false;
            e = null;
            result = null;
            runningThreadId = null;
        }
    }
924262
public void release() 
    {
    	IPhynixxManagedConnection<C> con= this.connection;
        if (connection != null) {
            this.connection.removeConnectionListener(this);
        }
        this.connection = null;
        
        // return con; 
    }
554845
public void release() {
        HMSAgentLog.d("release");
        if (application != null) {
            application.unregisterActivityLifecycleCallbacks(this);
        }

        clearCurActivities();
        clearActivitResumeCallbacks();
        clearActivitPauseCallbacks();
        application = null;
    }
1266450
public void release() {
	this.base = null;
	current = root;
	current.body = null;
	current.after = null;
	current.before = null;
    }
353227
public void release(int capacity) {
        if (capacity < 0) {
            throw new IllegalArgumentException("capacity to release cannot be negative");
        }

        // in the common 'good' case where we have our full capacity available we can
        // short circuit going any further and avoid unnecessary locking.
        if (availableCapacity >= 0 && availableCapacity != maxCapacity) {
            synchronized (lock) {
                availableCapacity = Math.min((availableCapacity + capacity), maxCapacity);
            }
        }
    }
1195114
public function release()
    {
        if ($this->semaphoreId) {
            $released = sem_release($this->semaphoreId);
            $this->semaphoreId = null;

            if (!$released) {
                throw new \RuntimeException('Failed to release lock.');
            }
        }
    }
799352
private void release() {
        try {
            Method release = BoundObjectTable.Table.class.getDeclaredMethod("release", String.class);
            release.setAccessible(true);
            release.invoke(boundObjectTable, boundId);
        } catch (Exception x) {
            LOG.log(Level.WARNING, "failed to unbind " + boundId, x);
        }
    }
1075263
public final void release() {
		synchronized (this.LOCK) {
			if ((this.owner != null)
					&& (this.owner.get() == Thread.currentThread())) {
				this.acquire--;

				if (this.acquire == 0) {
					this.owner = null;
					this.LOCK.notify();
				}

				return;
			}

			if ((this.owner != null) && (this.owner.get() == null)) {
				this.owner = null;
				this.acquire = 0;
				this.LOCK.notify();
			}

			throw new IllegalMonitorStateException(Thread.currentThread()
					.getName()
					+ " is not the owner of the lock. "
					+ ((this.owner != null) ? ((Thread) this.owner.get())
							.getName() : "nobody") + " is the owner.");
		}
	}
506238
public void release() throws Exception {
        synchronized (this) {
            if (log.isDebugEnabled()) {
                log.debug("Releasing lock on " + lockFile.getAbsolutePath());
            }
            if (fileLock != null) {
                try {
                    fileLock.release();
                    fileLock = null;
                } catch (Exception e) {
                    throw new Exception("Unable to release locked file: " + lockFile.getAbsolutePath(), e);
                }
                if (fileChannel != null) {
                    try {
                        fileChannel.close();
                    } catch (IOException e) {
                        // ignore
                    }
                    fileChannel = null;
                }
                if (lockFile != null) {
                    if (lockFile.exists()) {
                        lockFile.delete();
                    }
                    lockFile = null;
                }
            }
        }
    }
582875
public void release() throws IOException {
    if(!fs.delete(lockFile, false)) {
      LOG.error("Thread {} could not delete dir lock {} ", threadInfo(), lockFile);
    }
    else {
      LOG.debug("Thread {} Released dir lock {} ", threadInfo(), lockFile);
    }
  }
596503
private void releaseAssignedResource(@Nullable Throwable cause) {

		assertRunningInJobMasterMainThread();

		final LogicalSlot slot = assignedResource;

		if (slot != null) {
			ComponentMainThreadExecutor jobMasterMainThreadExecutor =
				getVertex().getExecutionGraph().getJobMasterMainThreadExecutor();

			slot.releaseSlot(cause)
				.whenComplete((Object ignored, Throwable throwable) -> {
					jobMasterMainThreadExecutor.assertRunningInMainThread();
					if (throwable != null) {
						releaseFuture.completeExceptionally(throwable);
					} else {
						releaseFuture.complete(null);
					}
				});
		} else {
			// no assigned resource --> we can directly complete the release future
			releaseFuture.complete(null);
		}
	}
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);
    }
  }
57804
@Override
    public void reset() {
        updatesLock.writeLock().lock();

        if (storage != null) {
            storage.assign(0.0f);
        }

        if (updates != null)
            updates.assign(0.0f);

        updatesLock.writeLock().unlock();
    }
231844
@Override
	public void release(Throwable cause) {
		if (STATE_UPDATER.compareAndSet(this, State.ALIVE, State.RELEASING)) {
			signalPayloadRelease(cause);
		}
		markReleased();
		releaseFuture.complete(null);
	}
933094
public void release() {
        if (released.compareAndSet(false, true)) {
            synchronized (releasingLock) {
                if (released.get()) {
                    impl.release(Integer.MAX_VALUE);
                }
            }
        }
    }
155194
@Override
    public void release(IEntityLock lock) throws LockingException {
        getLockStore().delete(lock);
        ((EntityLockImpl) lock).setExpirationTime(new Date(0));
    }
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.");
    }