Message82234
| Author |
pitrou |
| Recipients |
amaury.forgeotdarc, bob.ippolito, georg.brandl, loewis, pitrou |
| Date |
2009年02月16日.12:46:10 |
| SpamBayes Score |
0.004322013 |
| Marked as misclassified |
No |
| Message-id |
<1234788393.79.0.11218715509.issue4136@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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() |
|