[New-bugs-announce] [issue15488] Closed files keep their buffer alive

Antoine Pitrou report at bugs.python.org
Sun Jul 29 19:56:32 CEST 2012


New submission from Antoine Pitrou:

>>> f = open("LICENSE", "rb")
>>> sys.getsizeof(f)
4296
>>> f.close()
>>> sys.getsizeof(f)
4296

Instead of waiting for the file object's deallocation, perhaps we should free the buffer when it is closed?

----------
components: IO, Library (Lib)
messages: 166801
nosy: pitrou
priority: low
severity: normal
status: open
title: Closed files keep their buffer alive
type: resource usage
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15488>
_______________________________________


More information about the New-bugs-announce mailing list