Message232116
If I understood correctly, Python 3.4 tries harder to find cycles and call destructors at the end of the program, but that's not a full guarantee. For example you can have a reference from a random C extension module.
While trying to come up with an example, I found one that I don't fully understand, but the point is that it shows how easy it is to defeats it:
import sys
f = open('foo.txt', 'w')
f.write('abc')
def func(*args):
return func
sys.settrace(func) |
|
| Date |
User |
Action |
Args |
| 2014-12-04 10:24:42 | arigo | set | recipients:
+ arigo, pitrou, vstinner, nikratio, neologix, serhiy.storchaka |
| 2014-12-04 10:24:42 | arigo | set | messageid: <[email protected]> |
| 2014-12-04 10:24:42 | arigo | link | issue17852 messages |
| 2014-12-04 10:24:41 | arigo | create | |
|