Android-Review icon indicating copy to clipboard operation
Android-Review copied to clipboard

Java单例模式中的代码应该是懒汉式吧?

Open zzhuazi opened this issue 5 years ago • 0 comments

饿汉式应该是类对象定义时就完成了对象创建; private static CustomManager mInstance = new CustomManager(); 懒汉式是调用getInstance()时才进行类对象的创建。

zzhuazi avatar Aug 18 '19 13:08 zzhuazi