Closed henrique-borba closed 1 year ago
When calling nd::prod with a PHP function as below the temporary NDArray* nda is not freed automatically.
nd::prod
NDArray* nda
$a = nd::prod([[1, 2], [3, 4]]);
I added the code below to check and free the input before returning when only one argument is provided to the function
... value = NDArray_Float_Prod(nda); CHECK_INPUT_AND_FREE(a, nda); // Check if nda is temporary and free before return RETURN_DOUBLE(value);
When calling
nd::prod
with a PHP function as below the temporaryNDArray* nda
is not freed automatically.I added the code below to check and free the input before returning when only one argument is provided to the function