So in Java if I have two objects of the same type and I set one of them to the other one(both have the same reference) will the garbage collector be called?
ClassName obj1 = new ClassName();
ClassName obj2 = new ClassName();
obj1 = obj2;
Will this call garbage collector? The reason I am asking is because I am making a game for android and I can't have the garbage collector being called while the game is running, as I want the best performance. I know that the "new" keyword will call garbage collection but I don't know if this will. Thanks!