Skip to content

Commit

Permalink
- Collector #1655: fixed severe memory leak in TemporaryStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed Jan 8, 2005
1 parent d1631cf commit 41391ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TemporaryStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ def _takeOutGarbage(self, oid):
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:
Expand All @@ -280,7 +282,9 @@ def _takeOutGarbage(self, oid):
(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

Expand Down

0 comments on commit 41391ce

Please sign in to comment.