Brian McCloud - 2008-03-18

Logged In: YES
user_id=365381
Originator: NO

I have noticed two problems with the AvoidInstantiatingObjectsInLoops rule that I'd like to mention here:
1. If the instantiated object is added to an array or collection, that should not count as a violation unless the array or collection is never used anywhere outside the loop (not quite the same as eeigjon's 1st half)
2. If the instantiated object is non-reusable (e.g. File, Reader, Writer, Stream), that should not count as a violation.