Set ownership of apr allocators.

Nicky 2012-10-27 12:40:52 +02:00
parent dae599eff0
commit f77f0561c6
3 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ void ll_init_apr()
apr_allocator_create( &pAlloc );
apr_pool_create_ex( &gAPRPoolp, 0, 0, pAlloc );
apr_allocator_owner_set( pAlloc, gAPRPoolp );
// <FS:ND>
@ -146,6 +147,7 @@ void LLAPRPool::createAPRPool()
ll_apr_warn_status(mStatus) ;
mStatus = apr_pool_create_ex( &mPool, mParent, 0, pAlloc );
ll_apr_warn_status(mStatus) ;
apr_allocator_owner_set( pAlloc, mPool );
// <FS:ND>

View File

@ -119,6 +119,7 @@ LLThread::LLThread(const std::string& name, apr_pool_t *poolp) :
apr_allocator_create( &pAlloc );
apr_pool_create_ex( &mAPRPoolp, 0, 0, pAlloc );
apr_allocator_owner_set( pAlloc, mAPRPoolp );
// <FS:ND>

View File

@ -55,6 +55,7 @@ LLThreadSafeQueueImplementation::LLThreadSafeQueueImplementation(apr_pool_t * po
apr_status_t status = apr_allocator_create( &pAlloc );
status = apr_pool_create_ex( &mPool, 0, 0, pAlloc );
apr_allocator_owner_set( pAlloc, mPool );
if(status != APR_SUCCESS)
throw LLThreadSafeQueueError("failed to allocate pool");