I have very simple question but the answer is still not clear. If i have class Person and inside class Person there is one attribute which references to other object(ex: Account). If Person object is eligible for GC so either that attribute will be eligible to be cleaned up?
Share
Yes, as soon as the instance of Person is removed by the GC, the instance of Account will also get eligible if no other reference to it exists.