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

Re: [PATCH] Pythonic Memory Pools for the Python Bindings

From: David James <james82_at_gmail.com>
Date: 2005-07-19 02:44:22 CEST

On 7/18/05, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> > - If a pool is not destroyed, it will be automatically
> > garbage-collected when it goes out of scope.
> What happens to C level memory that was allocated out of the pool at
> this point?
At this point, all objects which were created out of the pool are
'invalidated'. It's the same as if you called svn_destroy_pool on the
pool object. If you try to access a variable that has been deleted,
you may get segfaults. It's your responsibility to keep the pool
object around for as long as you keep the children of the pool around.

> Do the python level wrappers for the C level objects hold a
> reference to the pool to keep that from happening or something?
I'd love to do that! Any ideas on how I could implement it?



David James -- http://www.cs.toronto.edu/~james
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 19 03:31:06 2005

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.