THE VARIABLE map
is not used (not referenced) anywhere inside the while
cycle (or further down). Just because the variable is still in scope, as seen in source; or the fact that it does have a designated local variable entry in the method's bytecode does not mean that THE VARIABLE map
is actually in scope DURING RUNTIME, especially after JIT compilation.
Unless you compile with an option to explicitly keep unused local variables (in their whole scope), this is the expected behavior.
Proof (--XX:+PrintCompilation
):
im still working!!!!15586 Map Size15586
im still working!!!!15587 Map Size15587
im still working!!!!15588 Map Size15588
259509 23 % eu.revengineer.sync.ReferencesTest::doFunction @ -2 (144 bytes) made not entrant
*******im free*******