Esempio n. 1
0
        private void Dispose(bool disposing)
        {
            if (mActiveInstances != null)
            {
                mActiveInstances.Clear();
                mActiveInstances = null;
            }

            if (mInstances != null)
            {
                foreach (var inst in mInstances.Values)
                {
                    inst.Dispose();
                }

                mInstances.Clear();
                mInstances = null;
            }

            if (mRoot != null)
            {
                mRoot.Dispose();
                mRoot = null;
            }
        }
Esempio n. 2
0
        public void Dispose()
        {
            lock (mInstances)
                mInstances.Clear();

            mActiveInstances.Clear();
            if (mRoot != null)
            {
                mRoot.Dispose();
            }
        }