public void Dispose() { lock (m_Instance) { m_refCount--; } if (m_refCount <= 0) { m_adHelper.Close(); m_ThreadContext.Exit(); m_dataAccess = null; m_Instance = null; } }