Flush and clear all disposables in the array.
Flush and clear all disposables in the array.
Flush and remove all disposables, or a specific disposable.
Optionaldisposable:
DisposableType
The disposable to flush. Flush all if omitted.
Check if a disposable exists in the array.
The disposable.
true if exists, otherwise false.
Invoke the executor and push the returned disposable to the array.
A function that returns a disposable.
The returned disposable.
Invoke the executor and push the returned disposable to the array.
Do nothing if null | undefined is returned.
A function that returns either a disposable or null | undefined.
The returned disposable, or undefined.
Invoke the executor and push each returned disposable to the array.
A function that returns an array of disposables.
The returned array.
Invoke the executor and push each returned disposable to the array.
Do nothing if null | undefined is returned.
A function that returns an array of disposables or null | undefined.
The returned array, or undefined.
Push a disposable to the end of the array.
A disposable.
The same disposable.
Push multiple disposables to the end of the array.
An array of disposables.
The same array.
Push one or more disposables to the end of the array.
The same value.
Remove a disposable from the array without flushing it.
The disposable to remove.
true if removed, otherwise false.
Get current array size.
A Disposable Array is an IDisposable store that manages Disposers and IDisposables in array order.
This structure is optimized for frequent
pushoperations.A DisposableArray is also a Disposer, which means it can be the
disposemethod of an IDisposable.A DisposableArray is also an IDisposable, which means it can be managed by another disposable container.