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

Re: correct pool usage?

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 23 Aug 2009 11:04:41 +0200

You're right. Those should probably just use the subpool, too.

On Aug 23, 2009 4:34 AM, "Martin Hauner" <martin.hauner_at_gmx.net> wrote:

Hi,

I have a pool usage question. In libsvn_wc/update_editor.c(make_editor)
the code goes like this:

  /* Construct an edit baton. */
  eb = apr_pcalloc(subpool, sizeof(*eb));
  eb->pool = subpool;

  ...

  SVN_ERR(svn_dirent_get_absolute(&eb->anchor_abspath, anchor,
                                  pool));

  if (svn_path_is_empty(target))
    eb->target_abspath = eb->anchor_abspath;
  else
    eb->target_abspath = svn_dirent_join(eb->anchor_abspath, target,
                                         pool);
  ...

  eb->skipped_trees = apr_hash_make(subpool);
  eb->deleted_trees = apr_hash_make(subpool);

Is there a reason why the dirent calls above do not use subpool if anything
else
related to eb is using it?

--
Martin
Subcommander 2.0.0 Beta 4 - http://subcommander.tigris.org
a Win32/Unix/MacOSX subversion GUI client & diff/merge tool.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386446
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386451
Received on 2009-08-23 11:05:20 CEST

This is an archived mail posted to the Subversion Dev mailing list.