03e5dc6117
Otherwise, on Windows daemon might hold mapped regions for some time (until those objects are collection) and during the time those file become locked (it's impossible to modify or remove them) Reflection/Unsafe of course is not a cool thing to use, but JDK still (already for 18 years) doesn't have public API for this See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4724038 And https://stackoverflow.com/questions/2972986/how-to-unmap-a-file-from-memory-mapped-using-filechannel-in-java