You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2003/06/19 22:05:23 UTC

Re: svn commit: rev 6296 - in trunk/subversion: clients/cmdline include libsvn_client libsvn_wc

On Thu, Jun 19, 2003 at 02:06:32AM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_wc/entries.c	Thu Jun 19 02:06:20 2003
>...
>    /* Loop over each of the other entries. */
> -  for (hi = apr_hash_first (subpool, entries); hi; hi = apr_hash_next (hi))
> +  for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
>      {
>        const void *key;
>        apr_ssize_t klen;
> @@ -1688,7 +1688,7 @@
>  
>        entrypath = svn_path_join (dirpath, key, subpool);
>        SVN_ERR (walk_callbacks->found_entry (entrypath, current_entry,
> -                                            walk_baton));
> +                                            walk_baton, subpool));
>  
>        if (current_entry->kind == svn_node_dir)
>          {
> @@ -1699,6 +1699,8 @@
>                                    walk_callbacks, walk_baton,
>                                    show_deleted, subpool));
>          }
> +
> +      svn_pool_clear (subpool);

The "standard" pattern is to put this at the start of the loop. It is
slightly more optimal, but (primarily) if the loop contains a "continue",
then the pool will still be cleared if it gets invoked.

This pool *does* have a continue, but it makes no allocations prior to that
point (so no biggy right now). But if it grew something in the future...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org