[Zope-Checkins] CVS: Zope/lib/python/tempstorage -
TemporaryStorage.py:1.1.2.4
Andreas Jung
andreas at andreas-jung.com
Sat Jan 8 03:22:25 EST 2005
Update of /cvs-repository/Zope/lib/python/tempstorage
In directory cvs.zope.org:/tmp/cvs-serv13329/lib/python/tempstorage
Modified Files:
Tag: Zope-2_7-branch
TemporaryStorage.py
Log Message:
- Collector #1655: fixed severe memory leak in TemporaryStorage
=== Zope/lib/python/tempstorage/TemporaryStorage.py 1.1.2.3 => 1.1.2.4 ===
--- Zope/lib/python/tempstorage/TemporaryStorage.py:1.1.2.3 Wed May 19 19:18:02 2004
+++ Zope/lib/python/tempstorage/TemporaryStorage.py Sat Jan 8 03:22:24 2005
@@ -266,7 +266,9 @@
while roids:
roid = roids.pop(0)
# decrement refcnt:
- rc=referenceCount_get(roid, 0)
+ # DM 2005-01-07: decrement *before* you make the test!
+ # rc=referenceCount_get(roid, 0)
+ rc=referenceCount_get(roid, 0) - 1
if rc==0:
self._takeOutGarbage(roid)
elif rc < 0:
@@ -275,7 +277,9 @@
(ReferenceCountError.__doc__,`roid`,rc)
)
else:
- referenceCount[roid] = rc - 1
+ # DM 2005-01-07: decremented *before* the test! see above
+ #referenceCount[roid] = rc - 1
+ referenceCount[roid] = rc
try: del self._oreferences[oid]
except: pass
More information about the Zope-Checkins
mailing list