Performs null checks and disposes of assets. Ignores exceptions.

@param disposables its values will be disposed of (if they exist). Can be null.
519873
public static void gracefullyDisposeOf(final Map<?, ? extends Disposable> disposables) {
        if (disposables != null) {
            for (final Disposable disposable : disposables.values()) {
                gracefullyDisposeOf(disposable);
            }
        }
    }
1214432
static <K, V> void nullifyExpirable(ReferenceEntry<K, V> nulled) {
    ReferenceEntry<K, V> nullEntry = nullEntry();
    nulled.setNextExpirable(nullEntry);
    nulled.setPreviousExpirable(nullEntry);
  }
56511
public static void dispose() {

    if (xml2containerMap != null) {
      for (SpringContainer container : xml2containerMap.values()) {
        container.dispose();
      }
      xml2containerMap.clear();
    }
  }
404104
static void checkNoneNull(Iterable<?> objects) {
    if (!(objects instanceof ImmutableCollection)) {
      for (Object o : objects) {
        checkNotNull(o);
      }
    }
  }
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();
	}
595608
protected synchronized void dispose() {
        this.users--;
        if (this.users == 0) {
            try {
                Client currentClient = this.client.get();
                if (currentClient != null) {
                    currentClient.close();
                }
            } catch (Exception x) {
                // ignore
            }
        }
    }
373403
private void disposeDataProvidersAndRules() {
        for (final Map.Entry<DP, List<R>> entry : dataProvidersToRules.entrySet()) {
            // Dispose data provider
            final DP dataProvider = entry.getKey();
            if (dataProvider instanceof Disposable) {
                ((Disposable) dataProvider).dispose();
            }

            // Dispose rules
            final List<R> rules = entry.getValue();
            if (rules != null) {
                for (final R rule : rules) {
                    if (rule instanceof Disposable) {
                        ((Disposable) rule).dispose();
                    }
                }
            }
        }

        // Clears all triggers
        dataProvidersToRules.clear();
    }
194544
public void dispose() {
        try {
            connection.close();
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Disposes transaction [" + getId() + "] failed", e);
        } finally {
            isActive = false;
            connection = null;
            JdbcRepository.TX.set(null);
        }
    }
252623
private static boolean containsNonNull(Object... items) {
        for (Object item : items) {
            if (item != null) {
                return true;
            }
        }
        return false;
    }
1252885
<I> void register( Method disposeMethod, I injectee )
    {
        disposables.add( new Disposable( disposeMethod, injectee ) );
    }
834994
public static void disposeLoopsAndConnections() {
		TcpResources resources = tcpResources.getAndSet(null);
		if (resources != null) {
			resources._dispose();
		}
	}
1135325
public static void closeAllQuietly(Iterable<? extends AutoCloseable> closeables) {
		if (null != closeables) {
			for (AutoCloseable closeable : closeables) {
				closeQuietly(closeable);
			}
		}
	}
655666
function dispose() {
        if (this.disposed || !this.currentDisposable) {
            return;
        }
        this.disposed = true;

        // If the current disposable fulfills the disposable interface or just
        // a disposable function.
        var currentDisposable = this.currentDisposable;
        if (currentDisposable.dispose) {
            currentDisposable.dispose();
        }

        else {
            currentDisposable();
        }
    }
446444
public static void disposeQuietly(Disposable... disposables) {
    Arrays.stream(disposables)
        .forEach(
            disposable -> {
              try {
                if (disposable != null) {
                  disposable.dispose();
                }
              } catch (RuntimeException e) {
                // Suppress any exceptions during disposal
              }
            });
  }
372424
@SafeVarargs
  static <T> void checkNotNullArray(T... values) {
    for (T value : values) {
      checkNotNull(value);
    }
  }
161786
public void onClearGalleries(List<String> galleries) {

        if (galleries != null) {
            m_galleryDialog.getGalleriesTab().uncheckGalleries(galleries);
        }
    }
308017
function CompositeDisposable () {
  var args = [], i, len;
  if (Array.isArray(arguments[0])) {
    args = arguments[0];
    len = args.length;
  } else {
    len = arguments.length;
    args = new Array(len);
    for(i = 0; i < len; i++) { args[i] = arguments[i]; }
  }
  this._disposables = args;
  this.isDisposed = false;
  this.length = args.length;
}