Closed skendrot closed 6 years ago
So from what I can see you are assuming that declaring the variables outside of the loop scope will actually save you memory, which I believe is not correct.
All those variables are basic CLR types, thus declaring them inside the loop or outside of it will generate exactly the same IL!
To prove my point, please check this gist for a console app, copy and compile it, and then open the assembly with any reflection tool that shows the IL:
The Cimbalino Windows Phone Toolkit is now legacy code (replaced by the Cimbalino Toolkit), so I'm now closing all issues & pull requests and will archive this repository.
Also save on some managed memory by only declaring variables once.