aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-02-13 10:41:25 -0800
committerGravatar murgatroid99 <mlumish@google.com>2015-02-13 10:41:25 -0800
commit57dfd058510d1a3be0ce315ff51fb9f793befd64 (patch)
tree61de5e6d57dc5d985b81547546524706b86f99f6 /src/node
parentd66408ba5a23bdaac9a9764cc28ffe13edbfafea (diff)
Further improved memory management
Diffstat (limited to 'src/node')
-rw-r--r--src/node/ext/call.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc
index 4d719802fc..e6701efbd4 100644
--- a/src/node/ext/call.cc
+++ b/src/node/ext/call.cc
@@ -525,7 +525,6 @@ NAN_METHOD(Call::StartBatch) {
return NanThrowError("startBatch's second argument must be a callback");
}
Handle<Function> callback_func = args[1].As<Function>();
- NanCallback *callback = new NanCallback(callback_func);
Call *call = ObjectWrap::Unwrap<Call>(args.This());
shared_ptr<Resources> resources(new Resources);
Handle<Object> obj = args[0]->ToObject();
@@ -574,6 +573,7 @@ NAN_METHOD(Call::StartBatch) {
}
op_vector->push_back(std::move(op));
}
+ NanCallback *callback = new NanCallback(callback_func);
grpc_call_error error = grpc_call_start_batch(
call->wrapped_call, &ops[0], nops, new struct tag(
callback, op_vector, resources));