![]() Squeak Smalltalk : System : ![]() All Instances |
A correct observation but anyone for whom this matters understands (or will learn very quickly) that #allInstances is a utility method that cannot possibly give the correct answer in all situations. You have found one, but there are others (hint: think about method activation). The only true way to find all instances of some class is to do it yourself at the place where you need it, like here: obj := aClass someInstance. [obj == nil] whileFalse:[ obj := obj nextObject].