标签:
private object m_mutex = new object(); private bool m_initialized = false; private BigInstance m_instance = null; public BigInstance Instance { get { if (!this.m_initialized) { lock (this.m_mutex) { if (!this.m_initialized) { this.m_instance = new BigInstance(); this.m_initialized = true; } } } return this.m_instance; } }
标签:
原文地址:http://www.cnblogs.com/darknoll/p/4389108.html