Disposes the resources.
505987
public static void dispose() {
        final JdbcTransaction jdbcTransaction = TX.get();

        if (null != jdbcTransaction && jdbcTransaction.getConnection() != null) {
            jdbcTransaction.dispose();
        }

        final Connection connection = CONN.get();
        if (null != connection) {
            try {
                connection.close();
            } catch (final SQLException e) {
                throw new RuntimeException("Close connection failed", e);
            } finally {
                CONN.set(null);
            }
        }
    }
499188
protected void dispose() {
		// Remove shutdown hook to prevent resource leaks
		ShutdownHookUtil.removeShutdownHook(shutdownHook, getClass().getSimpleName(), LOG);

		try {
			PlanExecutor executor = this.executor;
			if (executor != null) {
				executor.stop();
			}
		}
		catch (Exception e) {
			throw new RuntimeException("Failed to dispose the session shutdown hook.");
		}
	}
1051178
@Override
	public void close() {

		// copy all resources as the close of a resource modifies the
		// xaresources ...
		Set<PhynixxXAResource<T>> tmpXAResources = new HashSet<PhynixxXAResource<T>>();
		synchronized (xaresources) {
			if (this.xaresources.size() > 0) {
				tmpXAResources.addAll(xaresources);
			}
		}
		// close all reopen XAResources ....
		for (Iterator<PhynixxXAResource<T>> iterator = tmpXAResources.iterator(); iterator.hasNext();) {
			PhynixxXAResource<T> xaresource = iterator.next();
			xaresource.close();
		}

		this.getXATransactionalBranchRepository().close();
	}
735338
function dispose() {
                if (!this.disposed) {
                    this.messageChannel.dispose();
                    this.messageChannel = void 0;
                    this.eventChannel = void 0;
                    this.mapper = void 0;
                    this.callbackCache = void 0;
                    this.circuit = void 0;
                    this.disposed = true;
                }
            }
834994
public static void disposeLoopsAndConnections() {
		TcpResources resources = tcpResources.getAndSet(null);
		if (resources != null) {
			resources._dispose();
		}
	}
174615
public void dispose(){
		Collection pageComponents = new ArrayList(pageComponentMap.values());
		Iterator it = pageComponents.iterator();
		while(it.hasNext()){
			PageComponent pageComponent = (PageComponent)it.next();
			remove(pageComponent);
		}
		contentPane.dispose();
		contentPane = null;
		super.dispose();
	}
2993
public void cleanup() {
        if (this.childStorages != null) {
            for (FileTempStorage storage : this.childStorages) {
                storage.cleanup();
            }
        }

        for (File file : this.files.values()) {
            FileUtils.deleteQuietly(file);
        }
        this.files.clear();
    }
316028
def dispose(self):
        """"""
        self._username = None
        self._password = None
        self._org_url = None
        self._proxy_url = None
        self._proxy_port = None
        self._token_url = None
        self._securityHandler = None
        self._valid = None
        self._message = None

        del self._username
        del self._password
        del self._org_url
        del self._proxy_url
        del self._proxy_port
        del self._token_url
        del self._securityHandler
        del self._valid
        del self._message
1178057
public void dispose() {
    parent.unlistenRequestMessage(); // TODO (buddy) - remove or refactor
    // SipSession -
    // make it per-callId. Update Subscription to do the same.

    if (dialog != null) {
      if (dialog.getState() != null) {
        if (dialog.getState().getValue() == DialogState._CONFIRMED) {
          try {
            Request bye = dialog.createRequest(Request.BYE);
            parent.addAuthorizations(callId.getCallId(), bye);
            transaction = parent.sendRequestWithTransaction(bye, false, dialog);
          } catch (Exception e) {
            LOG.error("Disposing call, couldn't send BYE: " + e.toString(), e);
          }
        }
      }

      dialog.delete();
    }

    if (callId != null) {
      parent.clearAuthorizations(callId.getCallId());
    }

    parent.dropCall(this);
  }
849132
public void freeResources() throws IOException {
        if(reader != null) {
            reader.close();
        }
        if(servletInputStream != null) {
            servletInputStream.close();
        }
    }
56511
public static void dispose() {

    if (xml2containerMap != null) {
      for (SpringContainer container : xml2containerMap.values()) {
        container.dispose();
      }
      xml2containerMap.clear();
    }
  }
486688
public static void disposeOf(final Disposable... disposables) {
        if (disposables != null) {
            for (final Disposable disposable : disposables) {
                disposeOf(disposable);
            }
        }
    }
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;
    }
817460
public void dispose() {
		singleton.clear();
		components.clear();
		pointcuts.clear();
		contexts.clear();
		instances.clear();
	}
954382
@Override
	public void dispose() {
		super.dispose();
		_cacheService.dispose();
		_discoveryService.dispose();
		_executorService.shutdown();
		_disposeExecutorService();
	}
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;
        }
    }
1013351
void dispose()
  {
    if( _pp == null )
    {
      return;
    }

    EditorUtilities.invokeInDispatchThread( () -> {
      if( _bShowInStudioGlassPane )
      {
        LabGlassPane.getInstance().removeModalComponent( _pp );
      }
      else
      {
        _pw.dispose();
      }
      _pp = null;
      _pw = null;
    } );
  }