Class ShareableArray<T>

Collection class for maintaining an array of types derived from Shareable.

Provides a safer way to maintain reference counts than a native array.

Type Parameters

Hierarchy (view full)

Constructors

Accessors

Methods

  • Traverse without Reference Counting

    Parameters

    • callback: ((value: T, index: number) => void)
        • (value, index): void
        • Parameters

          • value: T
          • index: number

          Returns void

    Returns void

  • This method is for use within constructors.

    Immediately after a call to the super class constructor, make a call to setLoggingName. This will have the effect of refining the name used for reporting reference counts.

    This method has the secondary purpose of enabling a tally of the number of classes in the constructor chain. This enables the runtime architecture to verify that destructor chains are consistent with constructor chains, which is a good practice for cleaning up resources.

    Notice that this method is intentionally protected to discourage it from being called outside of the constructor.

    Parameters

    • name: string

      This will usually be set to the name of the class.

    Returns void