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

Re: [PATCH] issue 1954 - v3

From: VK Sameer <sameer_at_collab.net>
Date: 2004-12-15 05:01:19 CET

On Wed, 2004-12-15 at 06:41, Garrett Rooney wrote:
> > Doesn't svn_destroy_pool (subpool) have to be called to free the
> > subpool? If so, I don't see how subpool memory would get freed if
> > SVN_ERR causes a jump out of add_or_open_file().
> Pools are hierarchical, if you don't destroy the subpool it will get
> cleaned up when its parent pool is eventually destroyed.

OK, that's good to know. I guess I don't see the point of relying on
that when I can just re-use an existing pool. Potentially, this function
could get called multiple times _and_ SVN_ERR could fail all those
times. In which case, there are multiple subpools to be destroyed.

Another alternative is to change from SVN_ERR to this (untested):

svn_error_t *err;
if (err = svn_path_check_valid (path, subpool))
    svn_pool_destroy (subpool);
    return err;

It doesn't seem very appealing.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 15 05:02:33 2004

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.