1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

fix memory leak

This commit is contained in:
ser1zw 2016-08-13 00:18:51 +09:00
parent 583544e74f
commit 45e10202cf

View file

@ -848,13 +848,14 @@ namespace rubyopencv {
cv::absdiff(*selfptr, *tmp, *retptr);
}
else {
delete retptr;
rb_raise(rb_eTypeError, "no implicit conversion of %s into Cv::Mat or Cv::Scalar",
rb_obj_classname(other));
}
}
catch (cv::Exception& e) {
Error::raise(e);
delete retptr;
Error::raise(e);
}
return mat2obj(retptr, CLASS_OF(self));