Mark Shannon <[email protected]> added the comment:
# This needs to be C code for this to fail, I'm writing it in Python for
clarity and brevity
class D:
def __get__(self, instance, owner):
del C.d
# There are now no strong references to self
self.whatever # Access to freed memory
# This can be Python
class C:
d = D()
C.d
----------
nosy: +Mark.Shannon
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46561>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com