still don't understand how to get rid of obsolete classes and bad references

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

still don't understand how to get rid of obsolete classes and bad references

Freeman Mayberry
 
I have been messing around with the obsolete classes in my image and no matter how many times I Garbage collect , set things to nul, clear command histories and numbers of other things I have tried they don't go away.   I have read the cleaning up junk article on the wiki along with others. 
 
From what I understand the classes stick around because something is referencing them.  How ever when I find an object that is referencing the obsolete class and set that reference to nul, accept the changes it seems like it just comes back later.  Am I supposed to set it to nil from something other than an inspector.  Why can't I see the obsolete classes in the system browser.
 



--
Freeman Mayberry

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: still don't understand how to get rid of obsolete classes and bad references

Tapple Gao
On Tue, Sep 09, 2008 at 07:23:06PM -0400, Freeman Mayberry wrote:

> I have been messing around with the obsolete classes in my image and no
> matter how many times I Garbage collect , set things to nul, clear command
> histories and numbers of other things I have tried they don't go away.   I
> have read the cleaning up junk article on the wiki along with others.
>
> >From what I understand the classes stick around because something is
> referencing them.  How ever when I find an object that is referencing the
> obsolete class and set that reference to nul, accept the changes it seems
> like it just comes back later.  Am I supposed to set it to nil from
> something other than an inspector.  Why can't I see the obsolete classes in
> the system browser.

When I am cleaning up obsolete classes, it really depends on
what I find referencing them. If it is the world menu or a flap,
I figure out how unregistration works with those services.

I've seen it due to these services. Unregistering was the
solution:

TheWorldMenu
FlapsRegistry
FileList
SystemChangeNotifier

I've seen it in some caches in Monticello. There are some
cleanup methods in Monticello. This problem has been fixed in
MC1.5.

I've also seen some morphs hang around due to obsolete step
handlers. This fixes that:

Utilities cleanseOtherWorldlySteppers

Instances may also be registered, and the above suggestion works
with them.

To find pointers, use either the pointer explorer menu item, or
the chase pointers menu item in the inspector. I had to fix bugs
in both of these tools; they weren't finding all the references.
My fixes are here:

http://bugs.squeak.org/view.php?id=7158

Every time I find something that is holding onto obsolete
classes that should not be, I add a freeSomeSpace script to
KernelExtensions that fixes it. Perhaps the cleanup script you
need exists in KernelExtensions:

Load KernelExtensions from http://www.squeaksource.com/311.html
Do this: SmalltalkImage current freeSpace

What class are you having problems with? what references have
you found to it? Maybe I can give you more targeted advice

Also, what are you setting to nil? Is it actually getting set to
nil? I don't know much about how automagic variable setting
works in the inspector. Sending the proper message to the object
is generally the recommended solution, not direct munging with
someones ivars

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners