In the code below, given that amethod has been called. At what point/line is the Object originally referenced by myObject, eligible for Garbage Col
amethod
myObject
Since you are holding myObject in classObject(reference is maintained), it(object in memory referenced through classObject) will not be available for Garbage collection until instance of Test is freed up/unloaded.
classObject
Test