| 3254 | |
| 3255 | template <typename T1> |
| 3256 | void free_callback_resources ( |
| 3257 | int nlhs, |
| 3258 | mxArray* plhs[], |
| 3259 | int nrhs, |
| 3260 | mxArray* prhs[] |
| 3261 | ) |
| 3262 | { |
| 3263 | // free resources |
| 3264 | for (int i = 0; i < nlhs; ++i) |
| 3265 | mxDestroyArray(plhs[i]); |
| 3266 | |
| 3267 | for (int i = 0; i < nrhs; ++i) |
| 3268 | { |
| 3269 | // don't call mxDestroyArray() on function handles (which should only ever be in prhs[0]) |
| 3270 | if (i == 0 && dlib::is_same_type<T1,function_handle>::value) |
| 3271 | continue; |
| 3272 | mxDestroyArray(prhs[i]); |
| 3273 | } |
| 3274 | } |
| 3275 | |
| 3276 | template < |
| 3277 | typename T1 |
nothing calls this directly
no outgoing calls
no test coverage detected