Fixed Op destructors not being called

This commit is contained in:
murgatroid99 2015-09-14 13:53:07 -07:00
parent a1ae03efe1
commit 9a7be95df9
2 changed files with 5 additions and 2 deletions

View File

@ -172,6 +172,9 @@ Handle<Value> Op::GetOpType() const {
return NanEscapeScope(NanNew<String>(GetTypeString()));
}
Op::~Op() {
}
class SendMetadataOp : public Op {
public:
Handle<Value> GetNodeValue() const {
@ -325,7 +328,7 @@ class ReadMessageOp : public Op {
}
~ReadMessageOp() {
if (recv_message != NULL) {
gpr_free(recv_message);
grpc_byte_buffer_destroy(recv_message);
}
}
Handle<Value> GetNodeValue() const {

View File

@ -88,6 +88,7 @@ struct Resources {
class Op {
public:
virtual ~Op();
virtual v8::Handle<v8::Value> GetNodeValue() const = 0;
virtual bool ParseOp(v8::Handle<v8::Value> value, grpc_op *out,
shared_ptr<Resources> resources) = 0;
@ -98,7 +99,6 @@ class Op {
};
typedef std::vector<unique_ptr<Op>> OpVec;
struct tag {
tag(NanCallback *callback, OpVec *ops,
shared_ptr<Resources> resources);