In the following code:
void method() {
HeavyObject heavy = new HeavyObject();
doStuffWith(heavy);
doOtherStuff();
}
... can it heavycollect garbage before or during doOtherStuff()? JLS recommendations are preferred, although real experiments would also be cool.
My goal is to determine whether or not it is heavy = nullcompletely useless or possibly has a certain benefit.
source
share