in reply to
Re: if(my) scope
in thread if(my) scope
Just to expand on the above:
In garbage-collected languages it is generally a bad idea to worry about exactly when a specific piece of data is garbage collected. It will happen at the runtime's convenience, no sooner, and no later. Doing immediate collection is generally more work (at runtime) than it is ever going to be worth.
So, expect that timing to change on different boxes, runs, and if you recompile. The only thing you are in good shape to be sure of it that it will happen after the variable has gone out of scope.