<分区>
Possible Duplicate:
C++ singleton vs completely static object
你好,
为什么我更喜欢单例而不是静态类方法。
MoneyPrinter::addJob(PrinterJob &job);
or
MoneyPrinter::getInstance().addJob(PrinterJob &job);
这只是风格问题吗? 你用什么?为什么?
附言。我知道 sigletons 默认情况下不是线程安全的(第一次初始化)。