[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2007-01-08 04:58:34 CET

On Sun, 2007-01-07 at 13:00 +0100, Erik Huelsmann wrote:
> Yes it is. If we were not intending to destroy the memory, why use a
> subpool at all?

If there's no loop, the use of a subpool is pointless and should be
excised.

> 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.

We leave memory allocated in the normal return case all the time.

If high memory use due to call fanout is an issue (and it pretty much
never is), it is an issue for the caller, not the callee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 8 04:58:11 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.