Public void useless() {
MyObject m1 = new MyObject();
MyObject m2 = new MyObject();
m1.ref = m2;
global.ref = m2;
return;
}

Example 1: A method with two local references on the stack, m1 and m2.

Back to Article