View Single Post
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-13-2014 , 21:09   Re: Creating static inside loop
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
it always best to stick to the "never create variables inside a loop" recommendation.
Variables should always be declared as close to the scope they're used in as possible, unless doing so reduces performance, which is not the case here. So leaving the static variable declaration inside the loop is the right thing to do.
__________________
hleV is offline