Linked by Thom Holwerda on Fri 14th Sep 2012 02:30 UTC, submitted by MOS6510

Permalink for comment 535272
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Member since:
2006-01-02
Yes, you are correct. I was only thinking about local variables.
There is little need, however, to have fields that would become unused while the owning object remained in use. In such a case, they shouldn't be fields. That's not to say that people won't do the wrong thing. I assume that's what you were talking about with your code smell comment.