Created
November 7, 2019 05:32
-
-
Save Hasiy/357835a8436a2221aa422078e804a030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SoftReference<Bitmap> 软引用对象 | |
WeakReference<ImageView> 弱引用对象 | |
强引用: 普通变量都属于强引用,比如 private Context context; | |
软引用: SoftReference,在发生OOM之前,垃圾回收器会回收SoftReference引用的对象。 | |
弱引用: WeakReference,发生GC的时候,垃圾回收器会回收WeakReference中的对象。 | |
虚引用: 随时会被回收,没有使用场景。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment