I would like to know if copying a member variable into local stack variable in each of the object's methods cause a performance hit?
class X {
Another instanceOfAnother;
void foo() {
Another local = instanceOfAnother; //Would like to know if this causes a performance hit
//with regards to any garbage collection
//infrastructure
}
}