We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d81dc1d commit 9ba1649Copy full SHA for 9ba1649
smmap/util.py
@@ -22,10 +22,9 @@
22
except NameError:
23
# Python 3 has no `buffer`; only `memoryview`
24
def buffer(obj, offset, size):
25
- # Actually, for gitpython this is fastest ... .
26
- return memoryview(obj)[offset:offset + size]
27
- # doing it directly is much faster !
28
- # return obj[offset:offset + size]
+ # Actually, for gitpython this is fastest ... but `memoryviews` LEAK!
+ #return memoryview(obj)[offset:offset + size]
+ return obj[offset:offset + size]
29
30
31
PY3 = sys.version_info[0] >= 3
0 commit comments