摘要: 在程序设计中我们经常会进行一些全局缓存设计,诸如使用静态或者全局根字段来引用某个对象,以便一次创建多次使用。如: class BigData { } class Program { static BigData cache; public static BigData DataCache { get { if (cache== null) cache= new BigData(); return cache; ... 阅读全文
posted @ 2012-11-09 10:32 diwer 阅读(231) 评论(0) 推荐(0) 编辑