Class NodePool<TNode>

This internal class maintains a pool of deleted nodes for reuse by the framework. This reduces the overhead from object creation and garbage collection.

Because nodes may be deleted from a NodeList while in use, by deleting Nodes from a NodeList while iterating through the NodeList, the pool also maintains a cache of nodes that are added to the pool but should not be reused yet. They are then released into the pool by calling the releaseCache method.

Type Parameters

Hierarchy

  • NodePool

Constructors

Methods

Constructors

Methods

  • Adds a node to the pool.

    Parameters

    • node: TNode

    Returns void

  • Releases all nodes from the cache into the pool

    Returns void

Generated using TypeDoc