From: Christoph Date: 2004-06-15T06:03:49+09:00 Subject: Re: undefine Robert Klemme wrote: .... > > What do you gain by undefining instance variables? If you access it via > @foo it'll be nil anyway. I did not advocate removing, a.k.a. undefining, instance variable, I was just pointing out that these removal methods exists - but since you asked: Removing an instance or class variable after its usefulness expired (a typical example are auxiliary instance variable used in nontrivial initializers distributed over several auxiliary methods) is IMO a good practice mainly for esthetical reasons (akin to the well established practice of always initialing instance variable before using them) - on occasion you might even catch an error this way. Another reason is that unused instance variable take up unnecessary memory space. It seems harder to me to make a similar compelling stylistic (and memory) case for the existence of removal methods for class variables and especially for global variables, and removal method for local variables make no sense at all. /Christoph