public void destroy() { _blocks = null; close(); if (_onDiskFile != null) { _onDiskFile.Delete(); if (_onDiskFile.Exists) { ; // onDiskFile.deleteOnExit(); // [henon] <--- hmm, how to do this? } _onDiskFile = null; } }
public void testDestroyWhileOpen() { TemporaryBuffer b = new TemporaryBuffer(); try { b.write(new TestRng(getName()) .nextBytes(TemporaryBuffer.DEFAULT_IN_CORE_LIMIT * 2)); } finally { b.destroy(); } }