Message82234
Bob, here is a small example showing how easy it is to encounter the GC
problem:
from json import JSONDecoder
import weakref
import gc
class MyObject(object):
def __init__(self):
self.decoder = JSONDecoder(parse_constant=self.parse_constant)
def parse_constant(self, *args, **kargs):
""" XXX """
wr = weakref.ref(MyObject())
gc.collect()
print wr() |
|
Date |
User |
Action |
Args |
2009-02-16 12:46:33 | pitrou | set | recipients:
+ pitrou, loewis, georg.brandl, bob.ippolito, amaury.forgeotdarc |
2009-02-16 12:46:33 | pitrou | set | messageid: <1234788393.79.0.11218715509.issue4136@psf.upfronthosting.co.za> |
2009-02-16 12:46:10 | pitrou | link | issue4136 messages |
2009-02-16 12:46:10 | pitrou | create | |
|