Mercurial > hg-stable
changeset 12391:ca5fd84d62c6 stable
Fix memory leak when using hg commands over http repositories
When using hg commands over an http repository in a long running process, a
httphandler instance is leaked for each command, because of a loop
handler.parent -> OpenerDirector and OpenerDirector.handlers -> handler which
is not handled by Python's gc. Discussion on #mercurial concluded that removing
the __del__ method solved the problem.
author | Alexandre Fayolle <alexandre.fayolle@logilab.fr> |
---|---|
date | Thu, 23 Sep 2010 11:41:27 +0200 |
parents | 9a93f4fb141b |
children | 741290486877 |
files | mercurial/url.py |
diffstat | 1 files changed, 0 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/url.py Wed Sep 22 19:15:27 2010 -0500 +++ b/mercurial/url.py Thu Sep 23 11:41:27 2010 +0200 @@ -469,9 +469,6 @@ _generic_start_transaction(self, h, req) return keepalive.HTTPHandler._start_transaction(self, h, req) - def __del__(self): - self.close_all() - if has_https: class BetterHTTPS(httplib.HTTPSConnection): send = keepalive.safesend