dont forget to count down the tally when objects are collected.
--- 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 $'
! !