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

Re: [PATCH] Destroy the APR subpool before every successful returnstatement

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2007-01-07 13:00:57 CET

On 1/7/07, Branko Čibej <brane@xbc.nu> wrote:
> Bhuvaneswaran Arumugam wrote:
> > Hello,
> >
> > Please find attached the patch. If this is a valid patch, i'd like to
> > prepare similar clean-up patch for remaining files under
> > subversion/libsvn_client directory.
> >
>
> The whole point of using pools is that you don't have to deallocate
> stuff (that's known to be size-bound). So no, this is not a valid patch.
> It just messes up the code without actually gaining much.

Yes it is. If we were not intending to destroy the memory, why use a
subpool at all?

Non-destruction of pools is valid when returning *in the error-case*,
because we assume that the error will be handled and a parent pool
will be cleared somewhere higher up the call chain. But for the
non-error return, we neither assume nor actually do something like it.

bye,

Erik.
Received on Sun Jan 7 13:01:07 2007

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.