Remove Finalizer

This commit is contained in:
j.laycock 2019-09-10 17:05:54 +01:00
parent 9c9dff7386
commit 15a4c91c28

View File

@ -5,7 +5,6 @@ package memory_map
import ( import (
"os" "os"
"reflect" "reflect"
"runtime"
"syscall" "syscall"
"unsafe" "unsafe"
@ -68,7 +67,6 @@ func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) {
mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunkSize) mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunkSize)
mMap.max_length = alignedMaxLength mMap.max_length = alignedMaxLength
mMap.End_of_file = -1 mMap.End_of_file = -1
runtime.SetFinalizer(mMap, mMap.DeleteFileAndMemoryMap)
} }
} }