I\'ve read through some of the Java garbage collection guides online, but I\'m still a bit unclear and wanted to make sure so that I don\'t have memory leaks in my code.
Remember, what you store in the var field is actually reference to the object, not the object itself. So when GC collects obj1, the var object is untouched (must not be touched), especially since it has a reference from obj2, which is still alive and well..