title: android garbage collector, freeing objects inside objects
body: <p>I'm very curious about how this thing works inside Android. I have a class with two List&lt;> inside, instantiated at runtime and loaded with objects created while reading some data, I want to know what happens with those Lists in this situation:</p>
  
  <ol>
  <li><p>Class A has List B and List C with many other initialized objects
  inside.</p></li>
  <li><p>Another different class get a reference of List C from a
  method of Class A, like  <code>public List&lt;myObject&gt; GetList()</code>.</p></li>
  <li><p>Somewhere in code, Class A is no longer used and application
  signals that to garbage collector, setting object to null.</p></li>
  </ol>
  
  <p>What happens with my List C that is referenced by other object?  What happens with Object class A?</p>
  
  <p>I've tried to track garbage collector with Logcat running apk in debugger step-by-step but no luck at all. Sometimes it frees memory, sometimes not, I couldn't pinpoint any specific behaviour.</p>