SVN::Client -- why does this leak?
From: Nik Clayton <nik_at_ngo.org.uk>
Date: 2006-11-09 13:43:32 CET
Hi,
I've just spent some time tracking down a memory leak in some code that uses
Attached is a test that demonstrates the problem. It boils down to this:
sub run {
return $r;
That leaks memory. Specifically, it leaks at the first line. If the first
my $pool = SVN::Pool->new_default();
...
There's no leak.
My problem is that I don't understand why. I've read the pool usage
Is this a bug in my understanding of how things work, or a bug in the
Attached is leak.pl. Run it, giving a URI as the first parameter. It'll
If you then edit leak.pl, and swap the order of the first two lines in run()
N
#!/usr/bin/perl
use strict;
use SVN::Client;
my $uri = shift || 'file:///home/nik/.svk/jc/local/CPAN/SVN-Web/branches/svn-client/Build.PL';
my %REPOS;
$| = 1;
print "\n";
exit;
sub run {
sub run_cat {
my($fh, $fc) = (undef, '');
return $fc;
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.