Hacker News new | ask | show | jobs
by chrisseaton 3072 days ago
> Does java detect that this escaped the stack? How?

Well you assigned the instance to a global variable. That's how Java knows. If you can see that then so can the Java compiler.