mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
clear mapped buf before unmap
This commit is contained in:
@@ -50,10 +50,11 @@ public abstract class MappedBufferWrapper {
|
||||
|
||||
public final void unmap() {
|
||||
long started = IOStatistics.DEBUG ? System.currentTimeMillis() : 0;
|
||||
if (!unmapMappedByteBuffer142b19(this)) {
|
||||
MappedByteBuffer buffer = getIfCached();
|
||||
myBuffer = null;
|
||||
if (!unmapMappedByteBuffer142b19(buffer)) {
|
||||
LOG.error("Unmapping failed for: " + myFile);
|
||||
}
|
||||
myBuffer = null;
|
||||
|
||||
if (IOStatistics.DEBUG) {
|
||||
long finished = System.currentTimeMillis();
|
||||
@@ -76,8 +77,8 @@ public abstract class MappedBufferWrapper {
|
||||
}
|
||||
|
||||
|
||||
private static boolean unmapMappedByteBuffer142b19(MappedBufferWrapper holder) {
|
||||
return clean(holder.getIfCached());
|
||||
private static boolean unmapMappedByteBuffer142b19(MappedByteBuffer buffer) {
|
||||
return clean(buffer);
|
||||
}
|
||||
|
||||
private static boolean clean(final MappedByteBuffer buffer) {
|
||||
|
||||
Reference in New Issue
Block a user