kill -9 MyClass allInstances

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

kill -9 MyClass allInstances

laurent laffont
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: kill -9 MyClass allInstances

Mariano Martinez Peck


2010/7/1 laurent laffont <[hidden email]>
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Screen shot 2010-07-01 at 9.27.08 AM.png (279K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: kill -9 MyClass allInstances

cedreek
In reply to this post by laurent laffont
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Cédrick

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: kill -9 MyClass allInstances

Göran Krampe
In reply to this post by laurent laffont
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: kill -9 MyClass allInstances

laurent laffont
Thank you all !

Laurent Laffont

http://pharocasts.blogspot.com/
http://magaloma.blogspot.com/


2010/7/1 Göran Krampe <[hidden email]>
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project