src/main/java/li/cil/oc2/common/vm/Allocator.java
/**
     * Clears all remaining allocations and logs their stack traces.
     */
Clears all remaining allocations and logs their stack traces.
Clears all remaining allocations and logs their stack traces .
public static void resetAndCheckLeaks() {
        if (allocated > 0) {
            for (final Allocation allocation : ALLOCATIONS.values()) {
                LOGGER.error(Arrays.stream(allocation.stacktrace).skip(3).map(StackTraceElement::toString)
                        .collect(Collectors.joining("\n  ", "Leaked memory allocation:\n  ", "")));
            }
        }
        ALLOCATIONS.clear();
        allocated = 0;
    }
public static void resetAndCheckLeaks ( ) { if ( allocated > 0 ) { for ( final Allocation allocation : ALLOCATIONS . values ( ) ) { LOGGER . error ( Arrays . stream ( allocation . stacktrace ) . skip ( 3 ) . map ( StackTraceElement :: toString ) . collect ( Collectors . joining ( "\n  " , "Leaked memory allocation:\n  " , "" ) ) ) ; } } ALLOCATIONS . clear ( ) ; allocated = 0 ; }
Clears all remaining allocations and logs their stack traces.
Clears all remaining allocations and logs their stack traces .
// Skip first three: Allocator::claimMemory, Allocation::new, Throwable::getStacktrace