Пример #1
0
        void IDisposable.Dispose()
        {
            if (m_Enumerators != null)
            {
                for (int i = 0; i < m_Enumerators.Count; ++i)
                {
                    if (m_Enumerators[i] != null)
                    {
                        ((IDisposable)m_Enumerators[i]).Dispose();
                    }
                }
                m_Enumerators.Clear();
                m_Enumerators = null;
            }

            if (m_Fibers != null)
            {
                for (int i = 0; i < m_Fibers.Count; ++i)
                {
                    Fiber fiber = m_Fibers[i];
                    fiber.ClearNestedOwner();
                    fiber.Dispose();
                }
                m_Fibers.Clear();
                m_Fibers = null;
            }

            m_ParentFiber = null;
        }
Пример #2
0
        void IDisposable.Dispose()
        {
            if (m_Enumerator != null)
            {
                ((IDisposable)m_Enumerator).Dispose();
                m_Enumerator = null;
            }

            if (m_Fiber != null)
            {
                m_Fiber.ClearNestedOwner();
                m_Fiber.Dispose();
                m_Fiber = null;
            }

            m_ParentFiber = null;
        }