Fix pool handling in git-svnimport to avoid memory leaks.
commit5d17d765ca754f3e9d87110394a0a397ea7ac2cf
authorStefan Sperling <stsp@elego.de>
Mon, 24 Sep 2007 10:57:40 +0000 (24 12:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Sep 2007 06:00:52 +0000 (24 23:00 -0700)
tree6a56f0617a7bc6edef15769b006101ced38f71bf
parent15eda0202aa3c63fa7b8f9f72df86f4e50eb1d2b
Fix pool handling in git-svnimport to avoid memory leaks.

- Create an explicit one-and-only root pool.
- Closely follow examples in SVN::Core man page.
  Before calling a subversion function, create a subpool of our
  root pool and make it the new default pool.
- Create a subpool for looping over svn revisions and clear
  this subpool (i.e. it mark for reuse, don't decallocate it)
  at the start of the loop instead of allocating new memory
  with each iteration.

See http://marc.info/?l=git&m=118554191513822&w=2 for a detailed
explanation of the issue.

Signed-off-by: Stefan Sperling <stsp@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svnimport.perl