Memory leak in PendingFuture?

Zhong Yu zhong.j.yu at gmail.com
Thu Apr 24 06:17:35 UTC 2014


In sun.nio.ch.PendingFuture, there is a static cached Throwable

    private static final CancellationException CANCELLED =
        new CancellationException();

Apparently, its Throwable.backtrace field contains an array of all
Classes on the call stack. This will prevent the user classes from
being garbage collected.

Zhong Yu


More information about the nio-dev mailing list