示例#1
0
AXIS2_EXTERN void AXIS2_CALL
axutil_free_thread_env(
    struct axutil_env *thread_env)
{
	axutil_allocator_t * allocator;
    if(!thread_env)
    {
        return;
    }

    if(--(thread_env->ref) != 0)
    {
        return;
    }

    /* log, thread_pool and allocator are shared, so do not free them */
    thread_env->log = NULL;
    thread_env->thread_pool = NULL;
    if(thread_env->error)
    {
        AXIS2_ERROR_FREE(thread_env->error);
    }
	allocator = thread_env->allocator;
    AXIS2_FREE(allocator, thread_env);
	axutil_allocator_free(allocator);
}
示例#2
0
int
main(
    void)
{
    const axutil_env_t *env = test_init();
    test_hash_get(env);
    test_file_diff(env);
    test_array_list(env);
    test_uuid_gen(env);
    test_md5(env);
    run_test_log();
    run_test_string(env);
    test_axutil_dir_handler_list_service_or_module_dirs();
    axutil_allocator_t *allocator = env->allocator;

/*    axutil_env_free(env);*/
    axutil_allocator_free(allocator);
    return 0;
}