---
title: "SoftReference 和 WeakReference"
author: "bleet"
date: "2011-07-10T13:39:16Z"
tags: []
categories: ["移动开发"]
slug: "softreference-weakreference"
draft: false
lastmod: "2011-07-10T13:39:16Z"
id: 1121058
url: "https://bleet.iteye.com/blog/1121058"
---

SoftReference 适合做缓存，修饰的对象在内存不足时并且没有直接引用时方可被回收
WeakReference 可以观察到被修饰的对象何时被回收