title: Java garbage collection cleanup of pointers
body: <p>I'm writing a function to reverse a linked list and at the end my data structure looks like this:</p>
  
  <p>OriginalPointer -> [Obj 1] &lt;- [Obj 2] &lt;- [Obj 3] &lt;- [Obj 4] &lt;- ReversedList</p>
  
  <p>The OriginalPointer is what I passed into the function, and the ReverseList is the pointer I'm returning. In java, once I've returned my ReverseList pointer, does the OriginalPointer get cleaned up by the garbage collection or is that pointer always going to be there? Just curious.</p>