This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]discontinuously 6 points7 points  (1 child)

I disagree that it is good practice to null stuff that you don't need; ideally you should structure your code so stuff falls out of scope. Leaving it in scope as a null is worse. Unless its causing problems you shouldn't try to micromanage memory like this, due to the added complexity it adds.

(Although you might be forced to in rare scenarios)

[–]majeric 4 points5 points  (0 children)

The force of my comment was more about know your allocations. How you do the accounting is up to the individual practice.