Amount of instances

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

Amount of instances

Juan Ignacio Vaccarezza
Hi all,
    Is there any way to see and inspect all the instances alive of a given class?

Regars,
Juan
Reply | Threaded
Open this post in threaded view
|

Re: Amount of instances

Mariano Martinez Peck


On Sat, May 5, 2012 at 11:01 PM, Juan Ignacio Vaccarezza <[hidden email]> wrote:
Hi all,
    Is there any way to see and inspect all the instances alive of a given class?

MyClass allInstances inspect.

BUT that answers ALL instances, even those NOT recheable from the GC. So you may want to do

Smalltalk garbageCollect.
MyClass allInstances inspect.

Cheers

 

Regars,
Juan



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Amount of instances

Juan Ignacio Vaccarezza
Thanks !!!!


On Sat, May 5, 2012 at 6:03 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Sat, May 5, 2012 at 11:01 PM, Juan Ignacio Vaccarezza <[hidden email]> wrote:
Hi all,
    Is there any way to see and inspect all the instances alive of a given class?

MyClass allInstances inspect.

BUT that answers ALL instances, even those NOT recheable from the GC. So you may want to do

Smalltalk garbageCollect.
MyClass allInstances inspect.

Cheers

 

Regars,
Juan



--
Mariano
http://marianopeck.wordpress.com