You can also use trick like
each become: String new
to swap references to empty object that will be garbaged.
On May 24, 2008, at 11:54 PM, Claus Kick wrote:
why not just do
MyClass allInstances do:[:i | i := nil].
Smalltalk unusedMemory.
(Cannot recall if unusedMemory triggers a GC in Squeak, or even
exists).
Anyways, the first should nil all of your instances and then get
them gc'ed.
--
Claus Kick
"Wenn Sie mich suchen: Ich halte mich in der Nähe des Wahnsinns auf.
Genauer gesagt auf der schmalen Linie zwischen Wahnsinn und Panik.
Gleich um die Ecke von Todesangst, nicht weit weg von Irrwitz und
Idiotie."
"If you are looking for me: I am somewhere near to lunacy.
More clearly, on the narrow path between lunacy and panic.
Right around the corner of fear of death,
not far away from idiotism and insanity."
_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners