#QUALITY by stefan
class: ObjectFileHandle
changed: #update:with:from:
use Logger
--- a/ObjectFileHandle.st Thu Jun 18 12:26:06 2020 +0200
+++ b/ObjectFileHandle.st Mon Jun 22 19:57:57 2020 +0200
@@ -279,29 +279,29 @@
"my method/class object was collected - unload the underlying objectfile"
changedObject == weakMethodRef ifTrue:[
- weakMethodRef nilAllCorpsesAndDo:[:idx |].
+ weakMethodRef nilAllCorpsesAndDo:[:idx |].
].
changedObject == weakClassRefs ifTrue:[
- weakClassRefs nilAllCorpsesAndDo:[:idx |].
+ weakClassRefs nilAllCorpsesAndDo:[:idx |].
].
self isObsolete ifTrue:[
- weakFunctionRefs notNil ifTrue:[
- weakFunctionRefs removeDependent:self.
- weakFunctionRefs := nil.
- ].
- weakClassRefs notNil ifTrue:[
- weakClassRefs removeDependent:self.
- weakClassRefs := nil.
- ].
- weakMethodRef notNil ifTrue:[
- weakMethodRef removeDependent:self.
- weakMethodRef := nil.
- ].
- ('ObjectFileHandle [info]: unloading ' , pathName , ' (method/classes were garbageCollected)') infoPrintCR.
- self unload.
- self removeUnusedObjectFile.
+ weakFunctionRefs notNil ifTrue:[
+ weakFunctionRefs removeDependent:self.
+ weakFunctionRefs := nil.
+ ].
+ weakClassRefs notNil ifTrue:[
+ weakClassRefs removeDependent:self.
+ weakClassRefs := nil.
+ ].
+ weakMethodRef notNil ifTrue:[
+ weakMethodRef removeDependent:self.
+ weakMethodRef := nil.
+ ].
+ Logger info:'ObjectFileHandle: unloading %1 (method/classes were garbageCollected)' with:pathName.
+ self unload.
+ self removeUnusedObjectFile.
].
"Created: 5.12.1995 / 18:05:08 / cg"