I can't remove file created numpy.memmap
funtion
class MyClass
def __init__(self):
self.fp = np.memmap(filename, dtype='float32', mode='w+', shape=flushed_chunk_shape)
...
def __del__(self):
del self.fp
os.remove(filename)
When I run del myclass
(instanse of MyClass) I've got error WindowsError: [Error 32] The process cannot access the file
. If I use memmap
and deleting the file in no objected oriented way everything ok. So I consider trouble in destructor. But why it happens?