[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Perl API memory leaks

From: Martin Lucina <mato_at_imatix.com>
Date: 2005-11-21 01:05:37 CET

Hello all,

I've been trying to use the SVN Perl API in a autobuilder script for a
project I'm working on and have found that it leaks memory. For
example, the following simple test case (run it with a repository URL as
the first argument) will allocate more memory each time
get_latest_revnum () is called:

---cut here
#!/usr/bin/perl

use strict;
use warnings;

use SVN::Client;
use SVN::Ra;

my ($auth);
my ($client);
my ($ra);

$auth = [
    SVN::Client::get_simple_provider (),
    SVN::Client::get_username_provider (),
    SVN::Client::get_ssl_server_trust_file_provider ()
    ];

$client = new SVN::Client (auth => $auth);

$ra = new SVN::Ra (url => $ARGV[0], auth => $auth);

while (1) {
    print $ra->get_latest_revnum (), "\n";
}
---cut here

Modifying the script to create $auth, $client and $ra inside the loop
and explicitly destroy them using undef after calling get_latest_revnum
() does not seem to help.

Is there any way around this?

Thanks,

-mato

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 21 01:38:26 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.