Skip to content

Free memory on MemoryFS.close #308

Description

@mostafa

Steps to reproduce:

  1. Run this piece of code in your favorite REPL.
from fs.memoryfs import MemoryFS

mem_fs = MemoryFS()
with open('large_binary_file', 'rb') as f:
	mem_fs.upload('/large_binary_file', f)
mem_fs.close()
  1. Watch python process before and after running this script.
  2. The memory is there and the files are not removed.
  3. Run del mem_fs and it immediately claims back the memory.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions