Preconditions.checkState(counter >= 0, "Cannot release resource: retain counter is %s.", counter);