Fix reference counting in loops over memoryviews (GH-4663)
Memoryview temps weren't being properly incremented (at the start of the loop) or decremented (at the end of the loop). They were, however, decremented in the exception handling case. Long-term I think we really should unify reference counting for memoryviews further. It's *slightly* different from PyObjects (mainly that it happens in wrapper functions rather than the main function) and that leads to a large chance that it just gets missed. Fixes https://github.com/cython/cython/issues/4662
Showing
Please register or sign in to comment