Disposes all triggers and data providers that are mapped to each other.
769287
private void disposeTriggersAndDataProviders() {
        for (final Map.Entry<T, List<DP>> entry : triggersToDataProviders.entrySet()) {
            // Disconnect from trigger
            unhookFromTrigger(entry.getKey());

            // Dispose trigger itself
            final T trigger = entry.getKey();
            if (trigger instanceof Disposable) {
                ((Disposable) trigger).dispose();
            }

            // Dispose data providers
            final List<DP> dataProviders = entry.getValue();
            if (dataProviders != null) {
                for (final DP dataProvider : dataProviders) {
                    if (dataProvider instanceof Disposable) {
                        ((Disposable) dataProvider).dispose();
                    }
                }
            }
        }

        // Clears all triggers
        triggersToDataProviders.clear();
    }
337051
public function dispose() {
        parent::dispose(); // Call parent dispose to write/close session and other common stuff before closing connection

        if ($this->sqlsrv) {
            sqlsrv_close($this->sqlsrv);
            $this->sqlsrv = null;
        }
    }
809231
public void dispose ()
    {
        if (_buffer != null) {
            // if there are sources bound to this buffer, we must wait
            // for them to be unbound
            if (_bound > 0) {
                _state = UNLOADING;
                return;
            }

            // free up our buffer
            _buffer.delete();
            _buffer = null;
            _state = UNLOADED;
        }
    }
1214137
private void purgeAllConnections() {
        synchronized (m_dbConns) {
            Iterator<DBConn> iter = m_dbConns.iterator();
            while (iter.hasNext()) {
                DBConn dbConn = iter.next();
                dbConn.close();
                iter.remove();
            }
        }
    }
759433
public static void disposeOf(final ObjectMap<?, ? extends Disposable> disposables) {
        if (disposables != null) {
            for (final Disposable disposable : disposables.values()) {
                disposeOf(disposable);
            }
        }
    }
934388
protected void dispose() {
        final WebSocket currentWebSocket = webSocket;
        if (currentWebSocket != null && currentWebSocket.isOpen()) {
            try {
                currentWebSocket.disconnect(WebSocketCloseCode.AWAY.getCode());
            } catch (final Exception exception) {
                postErrorEvent(exception);
            }
        }
    }
757593
public void dispose() {
		for (Iterator<Image> iter= fRegistry.values().iterator(); iter.hasNext(); ) {
			Image image= (Image)iter.next();
			image.dispose();
		}
		fRegistry.clear();
	}
1126339
@Override
    public void dispose() {
        LOG.ok("Dispose connector resources");

        config = null;

        if (connection != null) {
            connection.dispose();
            connection = null;
        }
        WebServiceConnection.shutdownBus();
    }
1327896
private void unmapDataProviderFromAllTriggers(final DP dataProvider) {
        if (dataProvider != null) {
            for (final List<DP> mappedDataProviders : triggersToDataProviders.values()) {
                mappedDataProviders.remove(dataProvider);
            }
        }
    }
34859
public static void disposeLoopsAndConnections() {
		HttpResources resources = httpResources.getAndSet(null);
		if (resources != null) {
			resources._dispose();
		}
	}
798101
def close(self):
        """"""

        # remove callbacks
        DatastoreLegacy.datastores[self.domain].remove(self)

        # delete data after the last instance is gone
        if self.release_storage and \
           not DatastoreLegacy.datastores[self.domain]:
            del DatastoreLegacy.store[self.domain]

        del self
760012
@Override public void close () {
    if (!disposed) {
      disposed = true;
      if (gfx.exec().isMainThread()) {
        gfx.gl.glDeleteTexture(id);
      } else {
        gfx.exec().invokeNextFrame(new Runnable() {
          public void run () { gfx.gl.glDeleteTexture(id); }
        });
      }
    }
  }
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;
    }
835844
public static void destroyAll() {
        for (Map.Entry<ServerConfig, ProtocolConfig> entry : SERVER_MAP.entrySet()) {
            entry.getValue().destory();
        }
        try {
            ProtocolConfig.destroyAll();
        } catch (Exception e) {
            // NOPMD
        }
    }
872474
@Override
  public synchronized void dispose() {
    if (saslClient != null) {
      try {
        saslClient.dispose();
      } catch (SaslException e) {
        // ignore
      } finally {
        saslClient = null;
      }
    }
  }
1273504
void releaseTriggers() {

        // look in each trigger list of each type of trigger
        for (int i = 0; i < TriggerDef.NUM_TRIGS; i++) {
            for (int j = 0; j < triggerLists[i].length; j++) {
                triggerLists[i][j].terminate();
            }

            triggerLists[i] = TriggerDef.emptyArray;
        }
    }
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;
    }