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

Re: svn commit: r18363

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-07 20:35:44 CET

On Tue, 7 Feb 2006, Daniel Berlin wrote:

>
> > > static svn_error_t *
> > > window_handler (svn_txdelta_window_t *window, void *baton)
> > > @@ -105,17 +156,23 @@
> > > struct encoder_baton *eb = baton;
> > > apr_pool_t *pool = svn_pool_create (eb->pool);
> >
> > > /* Write out the window. */
> > > len = header->len;
> > > - err = svn_stream_write (eb->output, header->data, &len);
> > > - if (err == SVN_NO_ERROR && instructions->len > 0)
> > > + SVN_ERR (svn_stream_write (eb->output, header->data, &len));
> > > + if (instructions->len > 0)
> > > {
> >
> > >
> > > svn_pool_destroy (pool);
> > > - return err;
> > > + return SVN_NO_ERROR;
> > > }
> >
> > The original code seems to ensure that the temporary subpool is destroyed
> > in the event of an error, while the new code doesn't. I'm not sure
> > whether this is particularly important though, especially since errors
> > at this point aren't particularly likely.
>
> I remember discussing this with someone when the branch was in
> development. The answer I got was "but if it error'd out here, you are
> going to get all the way back up the chain anyway, and something will
> destroy the parent pool, so it shouldn't matter".
>
We don't normally make sure subpools are destroyed on error. The
exception is when there is a resource we really want to get released (a
lock for example). Is there such a resource in this case?

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 7 20:36:22 2006

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.