[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: Christopher H. Laco <claco_at_chrislaco.com>
Date: 2005-11-21 01:50:17 CET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Lucina wrote:
> 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?

Have you tried using pools...SVN::Pool?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDgRnJ+66dLHM50ssRApNIAKCdkquRlC+VNyp0Icz+9R8UVM2kMgCZAeg5
1j/GwLebca5eMWbllTH6mY4=
=gpx+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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:51:32 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.