uninstall static method
Uninstalls a TracingDelegate from the current isolate.
The given delegate
must be the current delegate for this isolate.
It is usually a mistake to uninstall the current delegate while worker isolates with delegates created by the current delegate are still running.
After the current delegate has been uninstalled, a new delegate can be installed through install.
Implementation
static Future<void> uninstall(TracingDelegate delegate) async {
if (currentTracingDelegate != delegate) {
throw StateError('The given TracingDelegate is not installed: $delegate');
}
_hasBeenInstalled = false;
currentTracingDelegate = const NoopTracingDelegate();
await removePostIsolateInitTask(delegate.initialize);
await delegate.close();
}