Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created January 17, 2012 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/34c459f6fdd0ea3ce2f6 to your computer and use it in GitHub Desktop.
Save bnoordhuis/34c459f6fdd0ea3ce2f6 to your computer and use it in GitHub Desktop.
diff --git a/src/node_isolate.cc b/src/node_isolate.cc
index 52cf090..fce90e9 100644
--- a/src/node_isolate.cc
+++ b/src/node_isolate.cc
@@ -133,8 +133,11 @@ public:
Channel(uv_loop_t* loop, Callback callback, void* arg) {
callback_ = callback;
arg_ = arg;
+ printf("a: refcount=%d\n", uv_loop_refcount(loop));
uv_async_init(loop, &async_, OnMessage);
+ printf("b: refcount=%d\n", uv_loop_refcount(loop));
uv_unref(loop);
+ printf("c: refcount=%d\n", uv_loop_refcount(loop));
}
~Channel() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment