I'm using a WeakReference for ImageView in my (Obj_A), and I pass this ImageView WeakReference to another object (Obj_B) that assign it to an ImageView variable (But not a WeakReference as well), so will the receiver ImageView variable have the nature of the WeakReference?
I hope I managed to mold my question correctly, and I hope you understand what I mean.
No, your ImageView in Obj_B will not be a WeakReference. A WeakReference allows you to store a reference to an object in such a way that if that object has no other "strong" references anywhere, it will be garbage collected. By removing the WeakReference wrapper in Obj_B, you're now taking the object that your WeakReference was managing and storing your own strong reference to it.
A weak reference is a reference that does not protect the referenced object from collection by a garbage collector. Without seeing your code it is not possible for me to say if what you have done has any issues.
I suggest that you have a look at the following post:
How to use WeakReference in Java and Android development?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With