2013年6月3日

从微观看chrome 之一:Singleton<T> 范型类

摘要: Singleton是chrome中用来实现单列的一个范型类。chrome中大部分的与profile有关的服务都是用该类作为底层的实现。类定义的如下:template <typename Type, typename Traits = DefaultSingletonTraits<Type>, typename DifferentiatingType = Type>class Singleton { private: // Classes using the Singleton<T> pattern should declare a GetInstance(. 阅读全文

posted @ 2013-06-03 17:55 一颗麦粒 阅读(2469) 评论(2) 推荐(0) 编辑

导航