void release() {
        if (acquired <= 0) {
            throw new IllegalStateException("Cannot release a recycled or not yet acquired resource");
        }
        if (!Looper.getMainLooper().equals(Looper.myLooper())) {
            throw new IllegalThreadStateException("Must call release on the main thread");
        }
        if (--acquired == 0) {
            listener.onResourceReleased(key, this);
        }
    }
Decrements the number of consumers using the wrapped resource. Must be called on the main thread.

<p>
    This must only be called when a consumer that called the {@link #acquire()} method is now done with the
    resource. Generally external users should never callthis method, the framework will take care of this for
    you.
</p>
core/src/main/java/com/bumptech/glide/load/engine/EngineResource.java