mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
Fixes segmentation faults when deleting layers.
This commit is contained in:
parent
ce53225ef2
commit
e4ed30672b
1 changed files with 1 additions and 9 deletions
|
@ -11,16 +11,8 @@ namespace rubyopencv {
|
|||
namespace Layer {
|
||||
VALUE rb_klass = Qnil;
|
||||
|
||||
void free_layer(void* ptr) {
|
||||
delete (cv::dnn::Layer*)ptr;
|
||||
}
|
||||
|
||||
size_t memsize_layer(const void* ptr) {
|
||||
return sizeof(cv::dnn::Layer);
|
||||
}
|
||||
|
||||
rb_data_type_t opencv_layer_type = {
|
||||
"Dnn::Layer", { 0, free_layer, memsize_layer, }, 0, 0, 0
|
||||
"Dnn::Layer", { 0, 0, 0, }, 0, 0, 0
|
||||
};
|
||||
|
||||
VALUE layer2obj(cv::dnn::Layer* ptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue