Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RecyclePool<T>

循环对象池。

Type parameters

  • T

Hierarchy

  • RecyclePool

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • newRecyclePool(fn: function, size: number): RecyclePool

Properties

Private _count

_count: number = 0

Private _data

_data: T[]

Private fn

fn: function

Type declaration

    • (): T
    • Returns T

Accessors

data

  • get data(): T[]

length

  • get length(): number

Methods

add

  • add(): T

removeAt

  • removeAt(idx: number): void

reset

  • reset(): void

resize

  • resize(size: number): void

Generated using TypeDoc