AXIS2_EXTERN int axis2_remove_instance(axis2_svc_skeleton_t *inst, const axutil_env_t *env) { axis2_status_t status = AXIS2_FAILURE; if (inst) { status = AXIS2_SVC_SKELETON_FREE(inst, env); } return status; }
AXIS2_EXPORT int axis2_remove_instance(rampart_credentials_t *inst, const axutil_env_t *env) { axis2_status_t status = AXIS2_FAILURE; if (inst) { status = AXIS2_SVC_SKELETON_FREE(inst, env); } return status; }
AXIS2_EXTERN void AXIS2_CALL axis2_svc_free( axis2_svc_t * svc, const axutil_env_t * env) { if(!svc) { return; } if(svc->impl_class) { AXIS2_SVC_SKELETON_FREE((axis2_svc_skeleton_t *)svc->impl_class, env); } if(svc->param_container) { axutil_param_container_free(svc->param_container, env); } if(svc->flow_container) { axis2_flow_container_free(svc->flow_container, env); } if(svc->filename) { AXIS2_FREE(env->allocator, svc->filename); svc->filename = NULL; } if(svc->svc_desc) { AXIS2_FREE(env->allocator, svc->svc_desc); svc->svc_desc = NULL; } svc->parent = NULL; if(svc->module_list) { int i = 0; int size = 0; size = axutil_array_list_size(svc->module_list, env); for(i = 0; i < size; i++) { axutil_qname_t *qname = NULL; qname = axutil_array_list_get(svc->module_list, env, i); if(qname) { axutil_qname_free(qname, env); } } axutil_array_list_free(svc->module_list, env); } if(svc->schema_list) { axutil_array_list_free(svc->schema_list, env); } if(svc->engaged_module_list) { axutil_array_list_free(svc->engaged_module_list, env); } if(svc->axis_svc_name) { AXIS2_FREE(env->allocator, svc->axis_svc_name); svc->axis_svc_name = NULL; } if(svc->op_alias_map) { axutil_hash_index_t *hi = NULL; void *val = NULL; for(hi = axutil_hash_first(svc->op_alias_map, env); hi; hi = axutil_hash_next(env, hi)) { axutil_hash_this(hi, NULL, NULL, &val); if(val) { if(axis2_op_is_from_module((axis2_op_t *)val, env) == AXIS2_FALSE) { axis2_op_free((axis2_op_t *)val, env); } val = NULL; } } axutil_hash_free(svc->op_alias_map, env); } if(svc->op_action_map) { axutil_hash_index_t *hi = NULL; const void *key = NULL; for(hi = axutil_hash_first(svc->op_action_map, env); hi; hi = axutil_hash_next(env, hi)) { axutil_hash_this(hi, &key, NULL, NULL); if(key) { AXIS2_FREE(env->allocator, (axis2_char_t *)key); key = NULL; } } axutil_hash_free(svc->op_action_map, env); } if(svc->op_rest_map) { axis2_core_utils_free_rest_map(env, svc->op_rest_map); } if(svc->schema_target_ns_prefix) { AXIS2_FREE(env->allocator, svc->schema_target_ns_prefix); svc->schema_target_ns_prefix = NULL; } if(svc->target_ns) { AXIS2_FREE(env->allocator, svc->target_ns); svc->target_ns = NULL; } if(svc->wsdl_path) { AXIS2_FREE(env->allocator, svc->wsdl_path); svc->wsdl_path = NULL; } if(svc->folder_path) { AXIS2_FREE(env->allocator, svc->folder_path); svc->folder_path = NULL; } if(svc->target_ns_prefix) { AXIS2_FREE(env->allocator, svc->target_ns_prefix); svc->target_ns_prefix = NULL; } if(svc->qname) { axutil_qname_free(svc->qname, env); } if(svc->style) { AXIS2_FREE(env->allocator, svc->style); } if(svc->base) { axis2_desc_free(svc->base, env); } if(svc->mutex) { axutil_thread_mutex_destroy(svc->mutex); } AXIS2_FREE(env->allocator, svc); }