On Nov 13, 2007 8:38 PM, Erik Huelsmann <email@example.com> wrote:
> The memory pointed to by hi isn't really leaked (since its still
> allocated in a pool); it does have a longer-than-necessary lifetime.
> Except for passing another pool into svn_xml_make_open_tag - which
> looks like overkill to me - I don't really see a way to resolve this
I agree that there are seldom "real leaks" when using pools, since pools are
usually destroyed after some time.
So may the iterator "hi" use the same pool as the hashtable to avoid
a longer-than-necessary lifetime? For example, pass a null for the pool to
apr_hash_first at line 568.
apr_hash_index_t * apr_hash_first(apr_pool_t *p, apr_hash_t *ht)
hi = apr_palloc(p, sizeof(*hi));
hi = &ht->iterator;
Received on Tue Nov 13 15:09:37 2007