DisposeAggregator is a utility class that allows you to add multiple items and then dispose them all at once.
You can add a function to call, an object with a dispose method, or an object with a Symbol.dispose method.
To dispose all the items, call dispose or use the Symbol.dispose symbol.
DisposeAggregator
is a utility class that allows you to add multiple items and then dispose them all at once. You can add a function to call, an object with adispose
method, or an object with aSymbol.dispose
method. To dispose all the items, calldispose
or use theSymbol.dispose
symbol.For example,