You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Sergey Mozharov (Jira)" <ji...@apache.org> on 2019/09/30 14:12:00 UTC
[jira] [Created] (ARROW-6740) Unable to delete closed
MemoryMappedFile on Windows
Sergey Mozharov created ARROW-6740:
--------------------------------------
Summary: Unable to delete closed MemoryMappedFile on Windows
Key: ARROW-6740
URL: https://issues.apache.org/jira/browse/ARROW-6740
Project: Apache Arrow
Issue Type: Bug
Components: Python
Affects Versions: 0.14.1
Environment: Windows 10
Reporter: Sergey Mozharov
{code:java}
import os
import pyarrow as pa
# Create a file and memory-map it
file_name = 'path-to-a-new-file'
mmap = pa.create_memory_map(file_name, 100)
# or open an existing file
# file_name = 'path-to-an-existing-file'
# mmap = pa.memory_map(file_name)
# close it
mmap.close()
mmap.closed # True
# try to delete it (can't delete until the python interpreter is killed)
os.remove(file_name) # PermissionError
# Note: opening an existing file as `pa.input_stream` works as expected{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)