Originally posted by kpedersen
View Post
Now, I guess where you have a point is if the constructor of one object has a data-dependency that can only be satisfied by the results of some other bit of code. So, that can push you to define something later in the scope, whether you want to or not.
Originally posted by kpedersen
View Post
Originally posted by kpedersen
View Post
For auditing, the benefit of defining variables at the point of use is that you end up with fewer overall lines of code. And that helps auditing, because you can simply fit more on the screen, without the code seeming crowded.
Anyway, the best approach to combating leaks is some combination of static analysis and running runtime leak-checkers on automated tests.
Comment