Aw: [Newbies] remove allInstances?
rudolf-rednose at gmx.de
Fri Sep 23 09:50:19 UTC 2016
Caution: lowskilled hobbyist
Smalltalk garbageCollect does that automatically for you
it removes only objects that are not in connection with other objects.
So you have to cut loose all connections from other objects to your Book instances.
Maybe you have variables within a workspace pointing to some Book instances.
Or a list object with references to all of your books. (How do you get to your books?)
Even an inspector, explorer or debugger pointing to a Book instance keeps the garbagecollector from removing them.
Hope that helps a little
Gesendet: Freitag, 23. September 2016 um 07:40 Uhr
Von: "Joseph Alotta" <joseph.alotta at gmail.com>
An: beginners at lists.squeakfoundation.org
Betreff: [Newbies] remove allInstances?
The main program I am working on now is called Books.
If I evaluate
Books allInstances => anOrderedCollection( aBook aBook aBook )
How do I set them all equal to nil like
Books allInstances => anOrderedCollection().
Beginners mailing list
Beginners at lists.squeakfoundation.org
More information about the Beginners