Example usage for com.badlogic.gdx.utils Disposable dispose

List of usage examples for com.badlogic.gdx.utils Disposable dispose

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils Disposable dispose.

Prototype

public void dispose();

Source Link

Document

Releases all resources of this object.

Usage

From source file:com.cyphercove.dayinspace.TitleScreenScene.java

License:Apache License

public void dispose() {
    for (Disposable disposable : disposables)
        disposable.dispose();
}

From source file:com.cyphercove.doublehelix.MainRenderer.java

License:Apache License

@Override
public void dispose() {
    for (Disposable disposable : disposables)
        disposable.dispose();
}

From source file:fr.plafogaj.screens.MainMenu.java

License:Open Source License

@Override
public void dispose() {
    for (Disposable t : m_texturesList)
        t.dispose();
    for (Disposable d : m_soundList)
        d.dispose();//from  w  w w .ja  v  a2 s  .  c o m
    for (Music m : m_ambianceMusicList)
        m.dispose();

    m_stage.dispose();
}

From source file:me.scarlet.undertailor.resource.ResourceFactory.java

License:Open Source License

/**
 * Disposes of the underlying {@link Resource} and
 * {@link Disposable} pair held by this/*from  w  ww  .  ja  va  2s . c o m*/
 * {@link ResourceFactory}.
 */
public final void dispose() {
    this.onDispose();
    if (this.disposableGen != null) {
        this.cancelGen = true;
    }

    if (this.disposable != null) {
        if (this.disposeOnGameThread()) {
            Disposable copy = this.disposable;
            Gdx.app.postRunnable(() -> copy.dispose());
        } else {
            this.disposable.dispose();
        }

        this.disposable = null;
    }

    if (this.reference != null) {
        if (this.reference.get() != null)
            this.reference.get().disposable = null;
        this.reference.enqueue();
        this.reference = null;
    }
}

From source file:me.scarlet.undertailor.resource.ResourceHandler.java

License:Open Source License

private void disposeLooseResource(Disposable disposable) {
    disposable.dispose();
}

From source file:uk.josephmansfield.interplanar.Utils.java

License:Open Source License

public static void dispose(Disposable disposable) {
    if (disposable != null) {
        disposable.dispose();
    }
}