pure
    Preparing search index...

    Type Alias ErcTypeConstructor<TName, TRepr>

    type ErcTypeConstructor<TName, TRepr> = {
        addRef: (value: TRepr) => TRepr;
        free: (value: TRepr) => void;
        marker: TName;
    }

    Type Parameters

    • TName
    • TRepr
    Index

    Properties

    Properties

    addRef: (value: TRepr) => TRepr

    Given a value, increase the ref count and return the new reference. The returned representation should be a different value if double indirection is used (each value is a pointer to the smart pointer), or the same value if single indirection is used (the value is pointing to the object itself).

    free: (value: TRepr) => void

    The function to free the underlying object.

    marker: TName

    A marker value for the underlying object type.

    This is commonly a string literal or a symbol.