| 699 | input_structure_(std::move(input_structure)), |
| 700 | output_structure_(std::move(output_structure)) {} |
| 701 | ~InnerFunction() { |
| 702 | nb::gil_scoped_acquire gil; |
| 703 | |
| 704 | fun_.reset(); |
| 705 | input_structure_.reset(); |
| 706 | if (output_structure_.use_count() == 1) { |
| 707 | output_structure_->reset(); |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | std::vector<mx::array> operator()(const std::vector<mx::array>& inputs) { |
| 712 | nb::gil_scoped_acquire gil; |