Open cptanalatriste opened 8 years ago
I just spent some time to find something along the lines of calling release()
on the odb
instance of the repository, but only came to the conclusion that such functionality does not exist.
When I wrote GitPython for py2.X, I was counting on the somewhat deterministic destruction of objects, and built everything around that. However, by now this is simply not the case anymore (if it ever was ...), so GitPython does have a problem with releasing system resources properly in some cases.
A known workaround for this issue is to fork code into it's own subprocess, to allow it to be cleaned up by the operating system when done. Doing this in your case might add a lot of complexity.
Something you could try is to use libgit2 directly, which will by it's very nature provide methods to release resources explicitly.
Also I am afraid there no fix for this issue at this time, unless someone is willing to dig in and assure respective release methods are added to the types in question.
I'm hitting this, 9 years later. I can't believe there's nothing that can be done?!
I'm using GitPython to do data mining on Git repository on a Windows 10 laptop. To retrieve the stats for commits -which might be on different repositories- I do the following:
However, I get the following error message every time:
Is there a way to free resource on every loop iteration to avoid the error message?