None
being leaked in slicing (or memoryview creation)
#3023
Labels
Milestone
None
being leaked in slicing (or memoryview creation)
#3023
compiling the following code (within numpy, but I do not think that matters):
will leak a reference to
None
on every call. The culprit is thememoryview(randoms)
line, although it split into two parts on the C-level (so I do not think the call to the python memoryview itself is actually involved).I can "fix" this by applying this patch:
but it seems unlikely on first sight that it is correct (I have difficulties following the code though). Obviously that reduces the refcount of None by one so patches over the issue since it gets called...
A reference count issue on None is harmless of course, but I am debugging numpy with
pytest-leaks
so its nice to keep even the harmless stuff clean.The text was updated successfully, but these errors were encountered: