Performs null checks and disposes of assets.

@param disposables will be disposed of (if they exist).
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;
    }
978868
public void dispose() {
        if (!disposedInd) {
            Collection<Binding> unsubscribe1 = null;
            Collection<CompositeBinding> unsubscribe2 = null;
            disposedInd = true;
            unsubscribe1 = bindings;
            unsubscribe2 = compBindings;
            bindings = null;
            compBindings = null;
            // we will only get here once
            unsubscribeFromAll(unsubscribe1);
            unsubscribeFromAllComposite(unsubscribe2);
        }
    }
898045
public void dispose() {
        for (ServiceRegistration registration : registrations) {
            registration.unregister();
        }
        registrations.clear();
        for (AbstractJTACrud crud : cruds) {
            crud.dispose();
        }
    }
57571
@Override
    public void dispose () throws SmbException {
        this.isEstablished = false;
        this.sealClientHandle = null;
        this.sealServerHandle = null;
        this.sealClientKey = null;
        this.sealServerKey = null;
        this.masterKey = null;
        this.signKey = null;
        this.verifyKey = null;
        this.type1Bytes = null;
    }
1223999
static public void dispose (ByteBuffer buffer) {
		if (!(buffer instanceof DirectBuffer)) return;
		if (cleanerMethod != null) {
			try {
				cleanMethod.invoke(cleanerMethod.invoke(buffer));
			} catch (Throwable ignored) {
			}
		}
	}
861874
public function dispose() {
        if ($this->stores) {
            foreach ($this->stores as $store) {
                $store->dispose();
            }
        }
        $this->stores = null;
        $this->readers = null;
        $this->writers = null;
    }
817460
public void dispose() {
		singleton.clear();
		components.clear();
		pointcuts.clear();
		contexts.clear();
		instances.clear();
	}
456958
private void collectGarbage() {
		// dispose unused objects if any
		NativePointerPhantomReference toCollect;
		while((toCollect = (NativePointerPhantomReference)collectableObjects.poll()) != null) {
		    liveComObjects.remove(toCollect);
		    toCollect.clear();
		    toCollect.releaseNative();
		}
	}
1308560
public Mono<Void> onClose(Disposable disposable) {
    return Mono.create(
        sink ->
            inbound.withConnection(
                connection ->
                    connection
                        .onDispose(disposable)
                        .onTerminate()
                        .subscribe(sink::success, sink::error, sink::success)));
  }
51883
public void dispose() {
        LOGGER.debug("dispose all Filters for FilterFactory {}...", factory.getClass().getName());
        synchronized (filterCache) {
            if (maintainLifeCycle) {
                Collection<Filter> values = filterCache.values();
                for (Filter filter : values) {
                    try {
                        filter.destroy();
                    } catch (RuntimeException e) {
                        LOGGER.warn("RuntimeException while calling destroy() of filter {}", filter.getClass()
                            .getName(), e);
                    }
                }
            }
            filterCache.clear();
        }
    }
794990
public void dispose() {
		removeAll();
		if (lightMap != null) lightMap.dispose();
		if (lightShader != null) lightShader.dispose();
	}
783175
public void dispose() {
        if (onSubscribe.disposed.compareAndSet(false, true)) {
            for (Object chunk : onSubscribe.chunks) {
                ReferenceCountUtil.release(chunk);
            }
            onSubscribe.chunks.clear();
        }
    }
1013351
void dispose()
  {
    if( _pp == null )
    {
      return;
    }

    EditorUtilities.invokeInDispatchThread( () -> {
      if( _bShowInStudioGlassPane )
      {
        LabGlassPane.getInstance().removeModalComponent( _pp );
      }
      else
      {
        _pw.dispose();
      }
      _pp = null;
      _pw = null;
    } );
  }
226492
@Override
  public Value<Void> run(List<GcsFilename> files) throws Exception {
    for (GcsFilename file : files) {
      try {
        gcs.delete(file);
      } catch (RetriesExhaustedException | IOException e) {
        log.log(Level.WARNING, "Failed to cleanup file: " + file, e);
      }
    }
    return null;
  }
861943
public function dispose() {
        if ($this->generator) {
            $this->generator->dispose();
            $this->generator = null;
        }
        $this->mdb = null;
    }
1206448
public void dispose() {
        storeCache();

        // PURGE provisioning data! BYE-BYE!!
        autoFeatures = null;
        knownFeatures = null;
        knownBadFeatures = null;

        for (SubsystemFeatureDefinitionImpl def : cachedFeatures.values()) {
            def.setProvisioningDetails(null);
        }
    }