public void Clear() { m_Format = null; ListPool <int> .Release(m_Splits); m_Splits = null; // Return the Formats we created for (int i = 0; i < m_FormatCache.Count; ++i) { if (m_FormatCache[i] != null) { FormatItemPool.ReleaseFormat(m_FormatCache[i]); } } m_FormatCache.Clear(); }
public void ReleaseToPool() { Clear(); if (Format != null) { FormatItemPool.ReleaseFormat(Format); } Format = null; NestedDepth = 0; Alignment = 0; foreach (var sel in Selectors) { FormatItemPool.ReleaseSelector(sel); } Selectors.Clear(); }