mirror of
https://github.com/python/cpython.git
synced 2025-12-10 02:50:09 +00:00
prevent ref cycles by removing bound method on close()
This commit is contained in:
parent
7c7250da45
commit
2518d3c1c0
1 changed files with 2 additions and 0 deletions
|
|
@ -732,6 +732,8 @@ class Aifc_write:
|
|||
if self._comp:
|
||||
self._comp.CloseCompressor()
|
||||
self._comp = None
|
||||
# Prevent ref cycles
|
||||
self._convert = None
|
||||
self._file.flush()
|
||||
self._file = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue