MappedByteBuffer释放内存
FileChannel在调用了map方法,进行内存映射得到MappedByteBuffer,但是没有提供unmap方法(),释放内存。可以利用工具类来释放MappedByteBuffer。ByteBufferSupport.unmap(mappedByteBuffer);mappedByteBuffer = null;
·
FileChannel在调用了map方法,进行内存映射得到MappedByteBuffer,但是没有提供unmap方法(),释放内存。可以利用工具类来释放MappedByteBuffer。
ByteBufferSupport.unmap(mappedByteBuffer);
mappedByteBuffer = null;
更多推荐
所有评论(0)