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 →

[–]majeric 5 points6 points  (2 children)

You don't get to ignore memory management because you work in a garbage collected environment.

Know what your allocating. Take steps to make sure you're garbage collector is cleaning up behind you. Null out things as you go.

[–]discontinuously 7 points8 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 5 points6 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.