How to remove an obsolate class
Joseph Frippiat
joseph.frippiat at skynet.be
Sat Jul 20 17:23:50 UTC 2002
Thank you for the answer.
I did not understand everything but now I can save my project.
But I have some questions:
After loading my project, "Smalltalk obsoleteClasses" still answer with
"#(AnObsoleteTank)". What is AnObsoleteTank ? How can I inspect it ?
I think that AnObsoleteTank is somewhere in my project but I don't know
where.
May I continue to work with this project of is it better to do some
fileouts and rebuild it ?
Thanks
Joseph Frippiat
-----Message d'origine-----
De : squeak-dev-admin at lists.squeakfoundation.org
[mailto:squeak-dev-admin at lists.squeakfoundation.org] De la part de Ned
Konz
Envoyé : vendredi 19 juillet 2002 2:41
À : squeak-dev at lists.squeakfoundation.org
Objet : Re: How to remove an obsolate class
On Thursday 18 July 2002 03:58 pm, Joseph Frippiat wrote:
> When I try to save my project, a debug window opens with the message
> "Error: Trying to write out, AnObsoleteTank".
>
> How can I remove the obsolete class and save my project ?
First, try to remember what might have been referring to it. You'll
need to remove that reference. If you can't remember anything (like
if you referred to it in a script, or if you have it in a global, or
in a workspace or something), then:
First, empty your trash can. Either manually, or do this:
Utilities emptyScrapsBook
Close any Workspace or debugger windows.
Then, empty the undo: turn off the Preference infiniteUndo if it's on.
Alternatively, ou can do this to clean it up:
CommandHistory resetAllHistory
Now try to save your project again. If it succeeds, fine. If not:
Once you are in the debugger, you should be able to find a reference
to your ObsoleteTank. Hit the "Debug" button and choose various stack
frames until you see a frame where self is your ObsoleteTank.
You have to find out what's hanging on to this object and not letting
it be garbage collected. There is a reference to it somewhere.
Open an inspector on your obsolete tank and close the debugger.
Now do this:
Smalltalk garbageCollect
Now select "self" in your inspector and open the context menu. Choose
"chase pointers". This will show you the path from Smalltalk (the
system dictionary) down to your object.
If it's blank, select "self" and choose "objects pointing to this
value". You'll have to chase these pointers manually until you find
what's hanging on to your object and then kill it.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|