Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis bnoordhuis/patsje.patch Secret
Created Nov 11, 2013

Embed
What would you like to do?
Check for leaked handles.
diff --git a/src/node.cc b/src/node.cc
index 3cb6a22..8e47662 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -3247,6 +3247,7 @@ int Start(int argc, char** argv) {
Context::Scope context_scope(env->context());
HandleScope handle_scope(env->isolate());
uv_run(env->event_loop(), UV_RUN_DEFAULT);
+ assert(handle_scope.NumberOfHandles() == 0); // Check for leaked handles.
EmitExit(env);
RunAtExit(env);
env->Dispose();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.