Open
Description
Steps to Reproduce
If we have a class with __del__
method:
import sys
class Foo:
def __init__(self, name):
self.name = name
def __del__(self):
sys.stdout.write(self.name + '\n')
Running the following statements with CPython,
def func():
foo = Foo('Foo 1')
bar = Foo('Foo 2')
del bar
func()
foo = Foo('Foo 3')
foo = Foo('Foo 4')
[Expected behavior:]
will get output
Foo 2
Foo 1
Foo 3
Foo 4
[Actual behavior:]
But running with IronPython, there's nothing output.
This blocks #938. FileIO
, TextIOWrapper
etc classes have finalizer (defined in their base class _IOBase
) calling close()
. But the finalizer is never called.
Metadata
Metadata
Assignees
Labels
No labels