Weird ref count of Repository obj when access remotes
shinningstar opened this issue · 1 comments
shinningstar commented
jdavid commented
Thanks for reporting.
This the code I have used to verify this bug is fixed:
from pygit2 import Repository
import sys
if __name__ == '__main__':
repo = Repository('/home/jdavid/sandboxes/itools/.git')
print sys.getrefcount(repo)
repo.remotes
print sys.getrefcount(repo)
If run with pygit2 v0.20.1 the output is:
2
5
If run with latest checkout of pygit2 the output is:
2
2