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.
On Sat, May 24, 2008 at 5:54 PM, Claus Kick claus_kick@web.de wrote:
why not just do
MyClass allInstances do:[:i | i := nil]. Smalltalk unusedMemory.
Huh...I've tried that too. I've closed all my Workspaces, set all instances to nil, and garbageCollectMost'ed...
Persistent little buggers...
Rob
Finally found the PointerFinder tool. Looks like my Aida site might have a cache that is holding on to some objects. Time to ask the Aida experts!
Thanks for the help,
Rob
On Sat, May 24, 2008 at 6:19 PM, Rob Rothwell r.j.rothwell@gmail.com wrote:
On Sat, May 24, 2008 at 5:54 PM, Claus Kick claus_kick@web.de wrote:
why not just do
MyClass allInstances do:[:i | i := nil]. Smalltalk unusedMemory.
Huh...I've tried that too. I've closed all my Workspaces, set all instances to nil, and garbageCollectMost'ed...
Persistent little buggers...
Rob
On 25.05.2008, at 00:19, Rob Rothwell wrote:
On Sat, May 24, 2008 at 5:54 PM, Claus Kick claus_kick@web.de wrote: why not just do
MyClass allInstances do:[:i | i := nil]. Smalltalk unusedMemory.
Huh...I've tried that too. I've closed all my Workspaces, set all instances to nil, and garbageCollectMost'ed...
garbageCollectMost only collects, as the name implies, most garbage, not all. For a full GC use garbageCollect.
- Bert -
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 Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
On 25.05.2008, at 22:23, stephane ducasse wrote:
You can also use trick like
each become: String new
to swap references to empty object that will be garbaged.
This should be used only as a last resort. It doesn't actually remove the references that are not garbage-collected, just replaces them with other objects.
A recipe for finding references is here:
http://wiki.squeak.org/squeak/2631
- Bert -
El 5/25/08 5:55 PM, "Bert Freudenberg" bert@freudenbergs.de escribió:
This should be used only as a last resort. It doesn't actually remove the references that are not garbage-collected, just replaces them with other objects.
A recipe for finding references is here:
http://wiki.squeak.org/squeak/2631
- Bert -
SmalltalkImage current fixObsoleteReferences And then chase pointers or explore pointers in the inspector if needed.
Edgar
On 24.05.2008, at 23:54, Claus Kick wrote:
why not just do
MyClass allInstances do:[:i | i := nil]. Smalltalk unusedMemory.
This is nonsense. i is a temporary variable, setting it to nil does nothing to the original references.
In this case, your sig's appropriateness approaches those of Tim ;)
- Bert -
-- 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 Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
beginners@lists.squeakfoundation.org