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:
parent
583544e74f
commit
45e10202cf
1 changed files with 2 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue