Options
All
  • Public
  • Public/Protected
  • All
Menu

Module pools/dll-object-pool

Type aliases

ObjectConstructor

ObjectConstructor<Value>: function

Function which constructs the object when given a set of arguments.
After object has been created, it needs to be returned back.

Type parameters

  • Value

Type declaration

    • (...args: any[]): Value
    • Parameters

      • Rest ...args: any[]

      Returns Value

ObjectDestructor

ObjectDestructor<Value>: function

Function called to destruct object.
Usually such a function will nullify object values, allowing GC to collect them. It might also free external hold resources, such as file descriptors, tcp connections etc.
After object has been destructed, it needs to be returned back.

Type parameters

  • Value

Type declaration

    • (resource: Undefinable<Value>): Undefinable<Value>
    • Parameters

      • resource: Undefinable<Value>

      Returns Undefinable<Value>

ObjectInitializer

ObjectInitializer<Value>: function

Function which initializes object with new values (i.e. overwrites the object).
Function can do anything he want with object, such as removing properties, adding new ones, overwrite with new values etc.
After object has been initialized, it needs to be returned back.

Type parameters

  • Value

Type declaration

    • (resource: Undefinable<Value>, ...args: any[]): Value
    • Parameters

      • resource: Undefinable<Value>
      • Rest ...args: any[]

      Returns Value