public void free() {
        if (consumer != null) {
            consumer.freeArray(array);
            array = null;
        }
    }
Free the memory used by pointer array.
indexr-query-opt/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java