One of our systems with heavy NIO usage showed gradual memory leaks.
Root cause:
- Direct byte buffers not released properly
- Missing
Cleaner
references in old JDKTools used:
-
jcmd
and jmap
- Eclipse MAT
- Manual tracking of buffer allocationsLesson: Off-heap memory is not magic — it leaks too.