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

Re: svn commit: r24932 - branches/ctypes-python-bindings/csvn

From: David Glasser <glasser_at_mit.edu>
Date: 2007-05-04 14:42:40 CEST

On 5/4/07, djames@tigris.org <djames@tigris.org> wrote:
> (ClientURI.join, ClientURI.dirname, ClientURI.longest_ancestor):
> Move pool to a local variable so that it will still be alive when
> the function returns.

> def join(self, uri):
> """Join this URI and the specified relative URI,
> adding a slash if necessary."""
> - return ClientURI(svn_path_join(self, uri, Pool()))
> + pool = Pool()
> + return ClientURI(svn_path_join(self, uri, pool))

I am not an expert on the internals of Python, but... is that really
how Python GC works? Something referred to only in a local can't get
GCed after the function returns?

--dave

-- 
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 4 14:43:09 2007

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