コード例 #1
0
ファイル: mod_lisp2.c プロジェクト: mbattyani/mod_lisp
static apr_status_t
destroy_socket_pool (void * dummy)
{
#if APR_HAS_THREADS
  apr_threadkey_private_delete(cfg_key);
#endif
  apr_pool_destroy (socket_pool);
  socket_pool = 0;
  return (APR_SUCCESS);
}
コード例 #2
0
void LLThreadLocalPointerBase::destroyStorage()
{
	if (sInitialized)
	{
		if (mThreadKey)
		{
			apr_status_t result = apr_threadkey_private_delete(mThreadKey);
			if (result != APR_SUCCESS)
			{
				ll_apr_warn_status(result);
				LL_ERRS() << "Failed to delete thread local data" << LL_ENDL;
			}
		}
	}
}
コード例 #3
0
/* Pool cleanup for the cached environment descriptor. */
static apr_status_t
cleanup_env(void *data)
{
  bdb_env_t *bdb = data;
  bdb->pool = NULL;
  bdb->dbconfig_file = NULL;   /* will be closed during pool destruction */
#if APR_HAS_THREADS
  apr_threadkey_private_delete(bdb->error_info);
#endif /* APR_HAS_THREADS */

  /* If there are no references to this descriptor, free its memory here,
     so that we don't leak it if create_env returns an error.
     See bdb_close, which takes care of freeing this memory if the
     environment is still open when the cache is destroyed. */
  if (!bdb->refcount)
    free(data);

  return APR_SUCCESS;
}