摘要:
1. singleton延时初始化class Singleton { private static Singleton _instance = null; public synchronized Singleton getInstance() { if(_instance == null) { _instance = new Singleton(); } return _instance; }}上述代码加入synchronized性能会降低,可以采用内嵌class的方式来优化掉这个不必要的synchr... 阅读全文
posted @ 2014-03-10 16:30
SaaSer
阅读(192)
评论(3)
推荐(0)