• da-woods's avatar
    Clean up memoryview reference counting on error (GH-4476) · 002e7c6f
    da-woods authored
    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.)
    002e7c6f
memoryview.pyx 29.1 KB