Message6798
Hi danilo2,
Looking at weakref at http://docs.python.org/library/weakref.html you'll note the paragraph:
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else.
Of particular note is "garbage collection is free to destroy..."
So even though the current implementation of CPython appears to destroy the weakref in a deterministic fashion, that will be due to it's reference counted gc implementation. Jython does not have deterministic garbage collection and so will not immediately destroy the weakref. In fact the time of destruction is in no way guaranteed. |
|
Date |
User |
Action |
Args |
2012-03-15 16:04:36 | fwierzbicki | set | messageid: <1331827476.8.0.208980423065.issue1851@psf.upfronthosting.co.za> |
2012-03-15 16:04:36 | fwierzbicki | set | recipients:
+ fwierzbicki, danilo2 |
2012-03-15 16:04:36 | fwierzbicki | link | issue1851 messages |
2012-03-15 16:04:36 | fwierzbicki | create | |
|