Caution: lowskilled hobbyist
 
anyway:
 
Hi Joseph,
Smalltalk garbageCollect does that automatically for you
BUT
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

Rudolf
 
-- 
 
 

Gesendet: Freitag, 23. September 2016 um 07:40 Uhr
Von: "Joseph Alotta" <joseph.alo...@gmail.com>
An: beginners@lists.squeakfoundation.org
Betreff: [Newbies] remove allInstances?
Greetings,

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 removeAllInstances.

Books allInstances => anOrderedCollection().


Sincerely,

Joseph.


_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to