For example,
WeakReference<Obj> weakObj = new WeakReference<>(obj);
Obj obj2 = weakObj.get()
In this example obj2 is strong reference type?
If yes means GC is not able to remove this reference until its parent get GCed?
For example,
WeakReference<Obj> weakObj = new WeakReference<>(obj);
Obj obj2 = weakObj.get()
In this example obj2 is strong reference type?
If yes means GC is not able to remove this reference until its parent get GCed?
Your weakObj
is a WeakReference
, and yes, get()
returns a standard reference.