Index: examples/dart/hello_world/hello/main.dart |
diff --git a/examples/dart/hello_world/hello/main.dart b/examples/dart/hello_world/hello/main.dart |
index 8397bb4be72436c8788940fccdfb14ba41fc82a5..4ff5e247f79848eee12ef636b5aeafbaa258570e 100644 |
--- a/examples/dart/hello_world/hello/main.dart |
+++ b/examples/dart/hello_world/hello/main.dart |
@@ -5,6 +5,7 @@ |
// To run this app: |
// mojo_shell mojo:hello |
+import 'dart:async'; |
import 'dart:mojo.application'; |
import 'dart:mojo.bindings'; |
import 'dart:mojo.core'; |
@@ -23,7 +24,12 @@ class Hello extends Application { |
// app has a chance to come up. Instead, we wait to close this app until |
// the "world" app comes up, does its print, and closes its end of the |
// connection. |
- c.onError = close; |
+ c.onError = closeApplication; |
+ } |
+ |
+ Future closeApplication() async { |
+ await close(); |
+ assert(MojoHandle.reportLeakedHandles()); |
} |
} |