public void finalizeObjects() throws Throwable {
        cleanGcObjects();
        for (WeakReference<IObject> el : new HashSet<>(gcObjects)) {
            IObject o = el.get();
            if (o == null)
                continue;

            ClassEntity entity = o.getReflection();
            if (entity.methodDestruct != null) {
                if (!o.isFinalized()) {
                    o.doFinalize();
                    pushCall(o, entity.methodDestruct.getName());
                    try {
                        entity.methodDestruct.invokeDynamic(o, this, TraceInfo.UNKNOWN);
                    } finally {
                        popCall();
                    }
                }
            }
        }
        gcObjects.clear();
    }
Remove all method which does not destruct

@throws Throwable
jphp-runtime/src/php/runtime/env/Environment.java