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
108b6cbd82
commit
2221af91a1
1 changed files with 3 additions and 0 deletions
|
|
@ -173,6 +173,7 @@ namespace rubyopencv {
|
|||
cv::resize(*selfptr, *destptr, *sizeptr, sx, sy, method);
|
||||
}
|
||||
catch (cv::Exception& e) {
|
||||
delete destptr;
|
||||
Error::raise(e);
|
||||
}
|
||||
|
||||
|
|
@ -200,6 +201,7 @@ namespace rubyopencv {
|
|||
cv::blur(*selfptr, *dstptr, *(Size::obj2size(ksize)), anchor_value, border_type_value);
|
||||
}
|
||||
catch (cv::Exception& e) {
|
||||
delete dstptr;
|
||||
Error::raise(e);
|
||||
}
|
||||
|
||||
|
|
@ -233,6 +235,7 @@ namespace rubyopencv {
|
|||
sigma_y_value, border_type_value);
|
||||
}
|
||||
catch (cv::Exception& e) {
|
||||
delete dstptr;
|
||||
Error::raise(e);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue