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

Re: Perl API memory leaks

From: Martin Lucina <mato_at_imatix.com>
Date: 2005-11-21 12:26:19 CET

claco@chrislaco.com said:
> Have you tried using pools...SVN::Pool?

I just tried the following version:

---cut here

use strict;
use warnings;

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

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

$pool = SVN::Pool->new_default (undef);

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

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

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

while (1) {
    my ($iter_pool) = SVN::Pool->new_default ($pool);
    print $ra->get_latest_revnum ($iter_pool), "\n";
---cut here

This version doesn't leak if the repository I'm accessing is local
(file:). If I try with my original test with a https: repository then
it leaks much less, but still leaks.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 21 12:29:38 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.