Cleaner vs. GC: Why Off-Heap Memory Lingers

Direct buffers rely on a `Cleaner` thread, not direct garbage collection, to asynchronously free native memory. This non-deterministic mechanism can delay deallocation, making memory appear to leak if the JVM heap has ample space, as GC cycles might not be triggered promptly.

Sources

Open the full topic