title: Object destruction when child object references a parent object
body: <p>A code example:</p>
  
  <pre><code>public class Parent{
    public void someMethod(){
      //start of some sort of loop
      Child child = new Child(this);
  
      //do something
      //replaces reference from old child to new child
      child = new Child(this);
      //repeats loop
    }
  }
  
  public class Child{
     Parent parent;
     public Child(Parent parent){
       this.parent = parent;
     }
  }
  </code></pre>
  
  <p>From what I understand of a object life cycle if a object were to be no longer referenced, then it would be eligible for gc, like when the child reference was changed to reference a new second Child object.<br><br>
  But what if each Child object has a reference to the object that created it, like above, would it be eligible for gc in this case once it is no longer referenced by its parent object?<br><br>
  If not, how can I write it so that it would be?</p>