Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created January 10, 2012 19:13
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/0b3bd8138068d9b884d7 to your computer and use it in GitHub Desktop.
Save bnoordhuis/0b3bd8138068d9b884d7 to your computer and use it in GitHub Desktop.
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 7c07ef3..425fb65 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -134,6 +134,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
ZCtx<mode>::After);
req_wrap->Dispatched();
+ ctx->Ref();
return req_wrap->object_;
}
@@ -191,6 +192,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
// delete the ReqWrap
delete req_wrap;
+ ctx->Unref();
}
static Handle<Value>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment