[comp.lang.smalltalk] How to remove instances

kalns@galaxy.cps.msu.edu (Edgar T Kalns) (05/08/91)

I am using Smalltalk/V on a Mac and am having difficulty
removing unnamed instances of a class.  The removal of
all instances is a necessity before Smalltalk allows you
to modify the class' instance variables.  Named instances
are easily removed by reassigning their values to nil.
I cannot find a way to do this if an instance has not 
specifically been named.  Thanks in advance for any help
you can provide.

--------------------------------------------------------
-- Edgar Kalns                                        --
-- E-mail: kalns@cps.msu.edu                          --
--------------------------------------------------------

wwm@arco.com (Wesley Monroe) (05/14/91)

In article <1991May7.234642.23120@msuinfo.cl.msu.edu> kalns@galaxy.cps.msu.edu
(Edgar T Kalns) writes:
>I am using Smalltalk/V on a Mac and am having difficulty
>removing unnamed instances of a class.  The removal of
>all instances is a necessity before Smalltalk allows you
>to modify the class' instance variables.  Named instances
>are easily removed by reassigning their values to nil.
>I cannot find a way to do this if an instance has not 
>specifically been named.  Thanks in advance for any help
>you can provide.
>
>--------------------------------------------------------
>-- Edgar Kalns                                        --
>-- E-mail: kalns@cps.msu.edu                          --
>--------------------------------------------------------
>
Execute the following in the Transcript window

Smalltalk initialize.

This will take care of the problem, but aware that all the 
text you have in your worksheet will disappear so save anything
you want to save around in a file.