diff --git a/ext/torch/torch.cpp b/ext/torch/torch.cpp index d6424cd..a046115 100644 --- a/ext/torch/torch.cpp +++ b/ext/torch/torch.cpp @@ -105,5 +105,5 @@ void init_torch(Rice::Module& m) { } else { throw std::runtime_error("Unsupported type"); } - }); + }, Rice::Return().takeOwnership()); }