@Override
    protected void destroy() {
        for (ResourceReference resource : resources) {
            resource.close();
        }
    }
<p>Retains and adds the given {@link SharedResource} to this ResourcePool. Note that this DOES call {@link
SharedResource#refer()}, as opposed to {@link #add(SharedResource)}.

<p>When this ResourcePool is destroyed, it will release the resource reference returned by the
{@link SharedResource#refer()} call.</p>

@param t   The SharedResource to retain and add.
@param <T> The class of parameter <code>t</code>.
@return The parameter <code>t</code>, to allow inlined calls to this function.
jdisc_core/src/main/java/com/yahoo/jdisc/application/ResourcePool.java