Readonly
addedReadonly
currentThe current object.
Readonly
currentA signal emitted when the current object changes.
If the last object being tracked is disposed, null
will be emitted.
Readonly
isReadonly
sizeThe number of objects held by the pool.
Readonly
updatedA signal emitted when an object is updated.
Dispose of the resources held by the object.
If the object's dispose
method is called more than once, all
calls made after the first will be a no-op.
It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.
Iterate through each object in the pool.
The function to call on each object.
Check if this pool has the specified object.
The object whose existence is being checked.
A pool of objects whose disposable lifecycle is tracked.
Typeparam
T - The type of object held in the pool.