public static void destroy(Object o) {
        if (o instanceof Destroyable) {
            destroy((Destroyable) o);
        } else if (o instanceof Collection) {
            destroy((Collection) o);
        }
    }
Calls {@link #init(Object) init} for each object in the collection.  If the collection is {@code null} or empty,
this method returns quietly.

@param c the collection containing objects to {@link #init init}.
@throws ShiroException if unable to initialize one or more instances.
@since 0.9
lang/src/main/java/org/apache/shiro/lang/util/LifecycleUtils.java