diff options
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/node.h b/src/node.h index 9f37e85119..91597c0327 100644 --- a/src/node.h +++ b/src/node.h @@ -73,6 +73,18 @@ NODE_EXTERN v8::Local<v8::Value> UVException(int errorno, const char* syscall = NULL, const char* message = NULL, const char* path = NULL); + +/* + * MakeCallback doesn't have a HandleScope. That means the callers scope + * will retain ownership of created handles from MakeCallback and related. + * There is by default a wrapping HandleScope before uv_run, if the caller + * doesn't have a HandleScope on the stack the global will take ownership + * which won't be reaped until the uv loop exits. + * + * If a uv callback is fired, and there is no enclosing HandleScope in the + * cb, you will appear to leak 4-bytes for every invocation. Take heed. + */ + NODE_EXTERN v8::Handle<v8::Value> MakeCallback( const v8::Handle<v8::Object> recv, const char* method, |