/// <summary> /// Get xml node instance from pool. For internal use only. /// </summary> /// <param name="source">Xml source.</param> /// <param name="offset">Offset from start of xml source.</param> /// <param name="useHashesForNames">Should names of nodes be hashed (faster) or not.</param> public static XmlNode Get(string source, ref int offset, bool useHashesForNames) { XmlNode item; if (_pool.Count > 0) { item = _pool[_pool.Count - 1]; _pool.RemoveLast(false); } else { item = new XmlNode(); } item.Init(source, ref offset, useHashesForNames); return(item); }
public FastList <T> Allocate() { return(_cache.RemoveLast() ?? new FastList <T>()); }