On 20/06/2018 15:08, Peter Levart wrote:
Like the following? http://cr.openjdk.java.net/~plevart/jdk-dev/DBBCache_Cleanup/webrev.05/
Yes, I think this looks good.
It will be tested by code that uses NIO from threads that exit but I agree it would be good to add a unit test for this.Do we need a test which proves that cached direct buffers are released when thread exits or would a unit test for TerminatingThreadLocal be enough? Maybe both?
-Alan