mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Merge pull request #270 from Queuecumber/master
Explicit Memory Management
This commit is contained in:
commit
8be40fc269
@ -101,6 +101,7 @@ Matrix::Init(Handle<Object> target) {
|
||||
NODE_SET_PROTOTYPE_METHOD(ctor, "setWithMask", SetWithMask);
|
||||
NODE_SET_PROTOTYPE_METHOD(ctor, "meanWithMask", MeanWithMask);
|
||||
NODE_SET_PROTOTYPE_METHOD(ctor, "shift", Shift);
|
||||
NODE_SET_PROTOTYPE_METHOD(ctor, "release", Release);
|
||||
|
||||
target->Set(NanNew("Matrix"), ctor->GetFunction());
|
||||
};
|
||||
@ -2253,3 +2254,14 @@ NAN_METHOD(Matrix::Shift){
|
||||
|
||||
NanReturnUndefined();
|
||||
}
|
||||
|
||||
NAN_METHOD(Matrix::Release)
|
||||
{
|
||||
NanScope();
|
||||
|
||||
Matrix *self = ObjectWrap::Unwrap<Matrix>(args.This());
|
||||
|
||||
self->mat.release();
|
||||
|
||||
NanReturnUndefined();
|
||||
}
|
||||
|
||||
@ -115,6 +115,8 @@ class Matrix: public node::ObjectWrap {
|
||||
JSFUNC(SetWithMask)
|
||||
JSFUNC(MeanWithMask)
|
||||
JSFUNC(Shift)
|
||||
|
||||
JSFUNC(Release)
|
||||
/*
|
||||
static Handle<Value> Val(const Arguments& args);
|
||||
static Handle<Value> RowRange(const Arguments& args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user