以下是一个CacheManager类
<pre>public class CacheManager {
private static CacheManager uniqueInstance = null;
private Object holdedShareContent = null;
private CacheManager() {
}
public static CacheManager getInstance() {
Object obj = new Object();
synchronized (obj) {
if (uniqueInstance == null) {
synchronized (obj) {
uniqueInstance = new CacheManager();
}
}
}
return uniqueInstance;
}
}</pre>