--- a/Registry.st Fri Jul 23 01:17:43 1999 +0200
+++ b/Registry.st Fri Jul 23 01:19:29 1999 +0200
@@ -248,6 +248,15 @@
"Created: 16.1.1997 / 18:08:00 / cg"
"Modified: 6.3.1997 / 22:29:58 / cg"
+!
+
+unregister:anObject atIndex:index
+ "strictly private"
+
+ handleArray at:index put:nil.
+ registeredObjects at:index put:nil.
+ indexTable removeKey:anObject.
+ tally := tally - 1.
! !
!Registry methodsFor:'registering objects'!
@@ -418,12 +427,9 @@
registeredObjects notNil ifTrue:[
wasBlocked := OperatingSystem blockInterrupts.
"/ index := registeredObjects identityIndexOf:anObject ifAbsent:0.
- index := indexTable at:anObject ifAbsent:0.
+ index := indexTable at:anObject ifAbsent:0.
index ~~ 0 ifTrue:[
- handleArray at:index put:nil.
- registeredObjects at:index put:nil.
- indexTable removeKey:anObject.
- tally := tally - 1.
+ self unregister:anObject atIndex:index.
].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
@@ -450,10 +456,7 @@
obj := registeredObjects at:index.
(obj notNil and:[obj ~~ 0]) ifTrue:[
(aBlock value:obj) ifTrue:[
- handleArray at:index put:nil.
- registeredObjects at:index put:nil.
- indexTable removeKey:obj.
- tally := tally - 1.
+ self unregister:obj atIndex:index.
]
]
].
@@ -468,5 +471,5 @@
!Registry class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Registry.st,v 1.52 1999-06-02 16:23:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Registry.st,v 1.53 1999-07-22 23:19:29 cg Exp $'
! !