4 ms·
i don't understand why o would escape if it's not inlined public int conditionalEscape(boolean cond1) { otherMethod(cond1); MyPair o = ne
by stefs 5y ago
i don't understand why o would escape if it's not inlined
public int conditionalEscape(boolean cond1) {
otherMethod(cond1);
MyPair o = new MyPair(/*p1=*/1, /*p2=*/2);
return o.getP1();
}
the reference still never leaves conditionalEscape (i.e. it's not assigned to a variable outside the methods scope), there's just a layer of indirection.
- vips7L 5y agoI'm assuming there's some bug with inlining that prevents EA from occuring after otherMethod gets inlined.