懒汉模式:
public class ImageUtil {
private static ImageUtil instance = null;
private ImageLoader mImageLoader;
private ImageUtil() {
mImageLoader = ImageLoader.getInstance();
}
public static synchronized ImageUtil getInstance() {
if (instance == null) {
instance = new ImageUtil();
}
return instance;
}
}