开发者

Unmap of NumPy memmap

开发者 https://www.devze.com 2023-03-13 17:44 出处:网络
I can\'t find any documentation on how numpy handles unmapping of previously memory mapped regions: munmap for num开发者_运维百科py.memmap() and numpy.load(mmap_mode).

I can't find any documentation on how numpy handles unmapping of previously memory mapped regions: munmap for num开发者_运维百科py.memmap() and numpy.load(mmap_mode).

My guess is it's done only at garbage collection time, is that correct?


Yes, it's only closed when the object is garbage-collected; memmap.close method does nothing.

You can call x._mmap.close(), but keep in mind that any further access to the x object will crash python.

0

精彩评论

暂无评论...
验证码 换一张
取 消