Clean up memoryview reference counting on error (GH-4476)
Fixes https://github.com/cython/cython/issues/4296 If there was an error in preparing the function arguments after a memoryview had already been created, then the memoryview was not cleaned up correctly. (This leaves it in the slightly odd position where memoryviews are cleaned up in the wrapper function on failure, but in the main function on success. I kind of think it'd be better to clean them up in the wrapper function in both cases, but I'm reluctant to mess with a system that largely works.)
Showing
Please register or sign in to comment