On 2 April 2013 14:56, commits@source.squeak.org wrote:
Frank Shearar uploaded a new version of Environments to project The Trunk: http://source.squeak.org/trunk/Environments-fbs.21.mcz
==================== Summary ====================
Name: Environments-fbs.21 Author: fbs Time: 2 April 2013, 2:56:27.995 pm UUID: a2afb389-193a-44a7-8664-559a4177936c Ancestors: Environments-cwp.20
When a class removes itself from the system, we need to forget about the class... including our reference to it in our list of bindings.
=============== Diff against Environments-cwp.20 ===============
Item was changed: ----- Method: Environment>>forgetClass:logged: (in category 'classes and traits') ----- forgetClass: aClass logged: aBool aBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass category]. self organization removeElement: aClass name. Smalltalk removeFromStartUpList: aClass. Smalltalk removeFromShutDownList: aClass. contents removeKey: aClass name ifAbsent: [].
bindings removeKey: aClass name ifAbsent: [].!
!
This, I think, it the necessary fix. It looks right, I can now unload XML-Parser and see that there are no bindings hanging around (so "PointerFinder on: XMLWriter" correctly says "ain't no such class"). But... Colin, what do you think?
frank
On Tue, Apr 2, 2013 at 6:59 AM, Frank Shearar frank.shearar@gmail.comwrote:
On 2 April 2013 14:56, commits@source.squeak.org wrote:
Frank Shearar uploaded a new version of Environments to project The
Trunk:
http://source.squeak.org/trunk/Environments-fbs.21.mcz
==================== Summary ====================
Name: Environments-fbs.21 Author: fbs Time: 2 April 2013, 2:56:27.995 pm UUID: a2afb389-193a-44a7-8664-559a4177936c Ancestors: Environments-cwp.20
When a class removes itself from the system, we need to forget about the
class... including our reference to it in our list of bindings.
=============== Diff against Environments-cwp.20 ===============
Item was changed: ----- Method: Environment>>forgetClass:logged: (in category 'classes
and traits') -----
forgetClass: aClass logged: aBool aBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass
category].
self organization removeElement: aClass name. Smalltalk removeFromStartUpList: aClass. Smalltalk removeFromShutDownList: aClass. contents removeKey: aClass name ifAbsent: [].
bindings removeKey: aClass name ifAbsent: [].!
!
This, I think, it the necessary fix. It looks right, I can now unload XML-Parser and see that there are no bindings hanging around (so "PointerFinder on: XMLWriter" correctly says "ain't no such class"). But... Colin, what do you think?
Frank, Colin, what about the case of non-classes. e.g. an Alias is created to a binding in Smalltalk, say #Foo, and then #Foo is removed from Smalltalk. I guess the aliases to #Foo need to get moved to the relevant undeclared when that happens right?
frank
On 2 April 2013 16:44, Eliot Miranda eliot.miranda@gmail.com wrote:
On Tue, Apr 2, 2013 at 6:59 AM, Frank Shearar frank.shearar@gmail.com wrote:
On 2 April 2013 14:56, commits@source.squeak.org wrote:
Frank Shearar uploaded a new version of Environments to project The Trunk: http://source.squeak.org/trunk/Environments-fbs.21.mcz
==================== Summary ====================
Name: Environments-fbs.21 Author: fbs Time: 2 April 2013, 2:56:27.995 pm UUID: a2afb389-193a-44a7-8664-559a4177936c Ancestors: Environments-cwp.20
When a class removes itself from the system, we need to forget about the class... including our reference to it in our list of bindings.
=============== Diff against Environments-cwp.20 ===============
Item was changed: ----- Method: Environment>>forgetClass:logged: (in category 'classes and traits') ----- forgetClass: aClass logged: aBool aBool ifTrue: [SystemChangeNotifier uniqueInstance classRemoved: aClass fromCategory: aClass category]. self organization removeElement: aClass name. Smalltalk removeFromStartUpList: aClass. Smalltalk removeFromShutDownList: aClass. contents removeKey: aClass name ifAbsent: [].
bindings removeKey: aClass name ifAbsent: [].!
!
This, I think, it the necessary fix. It looks right, I can now unload XML-Parser and see that there are no bindings hanging around (so "PointerFinder on: XMLWriter" correctly says "ain't no such class"). But... Colin, what do you think?
Frank, Colin, what about the case of non-classes. e.g. an Alias is created to a binding in Smalltalk, say #Foo, and then #Foo is removed from Smalltalk. I guess the aliases to #Foo need to get moved to the relevant undeclared when that happens right?
That sounds right, yes.
frank
frank
-- best, Eliot
On Tue, Apr 2, 2013 at 8:44 AM, Eliot Miranda eliot.miranda@gmail.comwrote:
Frank, Colin, what about the case of non-classes. e.g. an Alias is created to a binding in Smalltalk, say #Foo, and then #Foo is removed from Smalltalk. I guess the aliases to #Foo need to get moved to the relevant undeclared when that happens right?
Yes, you're both right. I'll write up some test cases.
Colin
squeak-dev@lists.squeakfoundation.org