dont forget to count down the tally when objects are collected.
authorca
Thu, 02 Jan 1997 19:09:36 +0100
changeset 2026 654cba4db794
parent 2025 9ab95f23af33
child 2027 4a2cdf9946ae
dont forget to count down the tally when objects are collected.
WeakIdSet.st
WeakIdentitySet.st
--- a/WeakIdSet.st	Thu Jan 02 18:47:18 1997 +0100
+++ b/WeakIdSet.st	Thu Jan 02 19:09:36 1997 +0100
@@ -130,7 +130,7 @@
      while rehashing
     "
     wasBlocked := OperatingSystem blockInterrupts.
-    keyArray forAllDeadIndicesDo:[:idx | ] replacingCorpsesWith:DeletedEntry.
+    keyArray forAllDeadIndicesDo:[:idx | tally := tally - 1] replacingCorpsesWith:DeletedEntry.
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 ! !
 
@@ -176,5 +176,5 @@
 !WeakIdentitySet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.19 1996-10-20 15:24:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakIdSet.st,v 1.20 1997-01-02 18:09:36 ca Exp $'
 ! !
--- a/WeakIdentitySet.st	Thu Jan 02 18:47:18 1997 +0100
+++ b/WeakIdentitySet.st	Thu Jan 02 19:09:36 1997 +0100
@@ -130,7 +130,7 @@
      while rehashing
     "
     wasBlocked := OperatingSystem blockInterrupts.
-    keyArray forAllDeadIndicesDo:[:idx | ] replacingCorpsesWith:DeletedEntry.
+    keyArray forAllDeadIndicesDo:[:idx | tally := tally - 1] replacingCorpsesWith:DeletedEntry.
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 ! !
 
@@ -176,5 +176,5 @@
 !WeakIdentitySet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.19 1996-10-20 15:24:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/WeakIdentitySet.st,v 1.20 1997-01-02 18:09:36 ca Exp $'
 ! !