#include <boost/thread/detail/singleton.hpp>

typedef boost::detail::thread::singleton<YOURCLASS> CLASSNAME;

CLASSNAME::::instance().XXX();

這樣,其實還有另外兩個的,但感覺比較複雜且我還不需要用到。

arrow
arrow
    全站熱搜

    讓地獄深紅的天亮 發表在 痞客邦 留言(0) 人氣()