When does the real memory from a pool actually get destroyed. I am using VC++ 6.0 to try and debug memory leaks. I thought that apr_pool_destroy destroys the real memory. If I uncomment the line apr_terminate(), all the memory is cleaned up. How can I immediately destroy the real memory from a top level pool?
 
I have the following code:
 
int main(int argc, char** argv)
{
    apr_pool_t *local_pool;
    apr_initialize();
    apr_pool_create(&local_pool, NULL);
    apr_pool_destroy(local_pool);
// apr_terminate();
#if defined(_DEBUG) && defined(WIN32)
   OutputHeading( "Examine outstanding allocations (dump memory leaks)" );
   _CrtDumpMemoryLeaks( );
   OutputHeading( "Program exits without freeing a memory block" );
   SET_CRT_DEBUG_FIELD( _CRTDBG_LEAK_CHECK_DF );
#endif
    return EXIT_SUCCESS;
}
 
 
 
Steve