{"blog_title":"memologue","image_url":null,"type":"rich","blog_url":"https://yupo5656.hatenadiary.org/","title":" Singleton\u901f\u5ea6\u6bd4\u8f03 (3) \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyupo5656.hatenadiary.org%2Fentry%2F20041011%2Fp3\" title=\" Singleton\u901f\u5ea6\u6bd4\u8f03 (3) \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 - memologue\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://yupo5656.hatenadiary.org/entry/20041011/p3","width":"100%","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/yupo5656/","provider_name":"Hatena Blog","categories":["C++"],"published":"2004-10-11 00:00:02","height":"190","version":"1.0","description":"(1) SynchronizedSingleton: \u5b8c\u5168\u540c\u671f\u578bSingleton \u7279\u306b\u8aac\u660e\u306f\u4e0d\u8981\u3067\u3057\u3087\u3046\u3002non-POD\u3067static\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u306e\u306f\u597d\u304d\u3058\u3083\u3042\u308a\u307e\u305b\u3093\u304c(\u30e1\u30f3\u30d0\u5909\u6570m)\u3001\u4eca\u56de\u306f\u76ee\u3092\u7791\u308a\u307e\u3059\u3002 template<typename T> class SynchronizedSingleton : private boost::noncopyable { public: static T& getInstance(void) { boost::mutex::scoped_lock lk(m); if (!instance) { instance = new T; } \u2026","author_name":"yupo5656"}