[squeak-dev] Unreferenced instance variables

Levente Uzonyi leves at elte.hu
Tue Dec 14 04:19:25 UTC 2010


On Mon, 13 Dec 2010, Bernhard Pieber wrote:

> Dear Squeakers,
>
> I just found out that we have quite a few unreferenced instance variables. I found 139 classes in a current trunk image. I used the following script:
>
> | unreferencedInstVars |
> unreferencedInstVars := Dictionary new.
> SystemNavigation default allBehaviorsDo: [:each |
> 	| instVars |
> 	(instVars := each unreferencedInstanceVariables) notEmpty
> 		ifTrue: [unreferencedInstVars at: each put: instVars]].
> unreferencedInstVars
>
> Could all of these be removed? Or are there reasons why some of those inst vars must not be deleted?

Some of them (probably most) can be safely removed, but there are some 
exceptions like Process' island and env.


Levente

>
> Curiously,
> Bernhard
>



More information about the Squeak-dev mailing list