Escape analysis determines all the places where a pointer can be stored and whether the lifetime of the pointer can be proven to be restricted only to the current procedure and/or thread.
As far as I know the JVM uses escape analysis for some performance optimisations like lock coarsening and lock elision. …
java stack allocation escape-analysis