[Pharo-project] kill -9 MyClass allInstances
Hi, It seems I've messed up something on Autotest unit tests and I have an Autotest instance running, I don't know where it's referenced. I've tried Smalltalk>>#garbageCollect and #garbageCollectMost .... still here. How can I find why an instance is not garbage collected ? How to kill it ? Cheers Laurent Laffont http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/
2010/7/1 laurent laffont <laurent.laffont@gmail.com>
Hi,
It seems I've messed up something on Autotest unit tests and I have an Autotest instance running, I don't know where it's referenced. I've tried Smalltalk>>#garbageCollect and #garbageCollectMost .... still here.
How can I find why an instance is not garbage collected ?
Check PointerFinder class and its class comment. Also check class PointerExplorer. Finally, explore the object you want, and then, in the explorer, right click and "chase pointers". I attach an screenshot as help. Cheers Mariano
How to kill it ?
Cheers
Laurent Laffont
http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Hi Laurent, Hi,
It seems I've messed up something on Autotest unit tests and I have an Autotest instance running, I don't know where it's referenced. I've tried Smalltalk>>#garbageCollect and #garbageCollectMost .... still here.
How can I find why an instance is not garbage collected ? How to kill it ?
You have to inspect/explore the instance of Autotest running. Then you should have some right click menu options that can help you -> "chase pointers" . There's also "inspect objects pointing to this value" and "explore pointers". Once you identified the objet that retains your instance, you have to "delete it", then garbage collect will work. hth,
Cheers
Laurent Laffont
http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Cédrick
On 07/01/2010 08:53 AM, laurent laffont wrote:
Hi,
It seems I've messed up something on Autotest unit tests and I have an Autotest instance running, I don't know where it's referenced. I've tried Smalltalk>>#garbageCollect and #garbageCollectMost .... still here.
How can I find why an instance is not garbage collected ? How to kill it ?
You can't "kill it", you can only get rid of references to it. So the problem is to find those references. There are some different tools for that, I tend to use: PointerFinder on: MyClass allInstances first ...and then take action from that info. There are some tricky things like some ActionMap somewhere and the Undo mechanism IIRC that tend to hold onto stuff. And of course, if you have some debugger hanging around... :). Or sloppy class variables etc. regards, Göran
Thank you all ! Laurent Laffont http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/ 2010/7/1 Göran Krampe <goran@krampe.se>
On 07/01/2010 08:53 AM, laurent laffont wrote:
Hi,
It seems I've messed up something on Autotest unit tests and I have an Autotest instance running, I don't know where it's referenced. I've tried Smalltalk>>#garbageCollect and #garbageCollectMost .... still here.
How can I find why an instance is not garbage collected ? How to kill it ?
You can't "kill it", you can only get rid of references to it. So the problem is to find those references. There are some different tools for that, I tend to use:
PointerFinder on: MyClass allInstances first
...and then take action from that info.
There are some tricky things like some ActionMap somewhere and the Undo mechanism IIRC that tend to hold onto stuff. And of course, if you have some debugger hanging around... :). Or sloppy class variables etc.
regards, Göran
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (4)
-
Cédrick Béler -
Göran Krampe -
laurent laffont -
Mariano Martinez Peck