Mladen Turk
Fri, 18 Jul 2008 03:35:37 -0700
Bojan Smojver wrote:
On Fri, 2008-07-18 at 16:30 +1000, Bojan Smojver wrote:*r=apr_pcalloc(rpool,sizeof(**r));This should really be malloc()'ed and free in de().
Of course if you can do that. However things like sockets and other APR objects depends on pools. With standard cleanup they'll be destroyed before de() is run. pre_cleanup address those things. It should be used in all cases where apr_object creates child pools. For example apr_memcache.c leeks memory because it doesn't call apr_pool_destroy in destructor although it creates one in constructor. (Probably because with standard cleanup it cores) Regards -- ^(TM)