还有一道题: static Singleton* getinstance(){ Singleton * tmp=instance; if(tmp==NULL){ Lock lock; tmp=instance; if(tmp==NULL){ tmp=new Singleton(); } } instance=tmp; return instance; } 判断代码是否有不妥?
点赞 2

相关推荐

牛客网
牛客企业服务