[VM] Added cleanup for Dart IO API

Change-Id: Iab9f567ef3d4310ee9511fa5ce375b7ccf200ef5
Reviewed-on: https://dart-review.googlesource.com/c/81442
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
diff --git a/runtime/bin/dart_io_api_impl.cc b/runtime/bin/dart_io_api_impl.cc
index d1a7bec..82645e7 100644
--- a/runtime/bin/dart_io_api_impl.cc
+++ b/runtime/bin/dart_io_api_impl.cc
@@ -23,6 +23,10 @@
   EventHandler::Start();
 }
 
+void CleanupDartIo() {
+  EventHandler::Stop();
+}
+
 void SetSystemTempDirectory(const char* system_temp) {
   Directory::SetSystemTemp(system_temp);
 }
diff --git a/runtime/include/bin/dart_io_api.h b/runtime/include/bin/dart_io_api.h
index 3684ae6..07a384c 100644
--- a/runtime/include/bin/dart_io_api.h
+++ b/runtime/include/bin/dart_io_api.h
@@ -13,6 +13,9 @@
 // Bootstraps 'dart:io'.
 void BootstrapDartIo();
 
+// Cleans up 'dart:io'.
+void CleanupDartIo();
+
 // Lets dart:io know where the system temporary directory is located.
 // Currently only wired up on Android.
 void SetSystemTempDirectory(const char* system_temp);