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.
DisposeAggregatoris 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 adisposemethod, or an object with aSymbol.disposemethod. To dispose all the items, calldisposeor use theSymbol.disposesymbol.For example,