Hi Rui,

You can find some important related information from here [1]

[1] http://wso2.org/library/3412

Thanks,
-Manjula

On Tue, 2008-04-08 at 23:53 +0800, Rui Feng Guan wrote:
> Thanks for your answer very much! Yes, it seems that the axis2/C
> manual is not as good as I expected.
>  
> I have another question:
>  
> My code is as following. I created nodes 10 times and in each time, I
> send them to server. I did not free any memory in the while loop but
> only free svc_client once. Do I free all nodes?
> Will the code lead to memory leak?
>  
> main()
> {
> ..........
> int i = 0;
> while(i++ < 10)
> {
>         payload = build_om_request(env, "abc");
>         ret_node = axis2_svc_client_send_receive(svc_client, env,
> payload);
> }
>  
> if (svc_client)
> {
>         axis2_svc_client_free(svc_client, env);
>         svc_client = NULL;
> }
> .............
> }
>  
> axiom_node_t *
> build_om_request(const axutil_env_t *env, char *request)
> {
>     axiom_node_t* greet_om_node = NULL;
>     axiom_element_t * greet_om_ele = NULL;
>     greet_om_ele = axiom_element_create(env, NULL, "greet", NULL,
> &greet_om_node);
>     axiom_element_set_text(greet_om_ele, env, request, greet_om_node);
> 
>     return greet_om_node;
> 
> }
> 
> 
> On 4/8/08, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: 
>         Rui Feng Guan wrote:
>                 I am a beginner in axis2.
>                 In sample source code notify_client.c,
>                 axiom_element_create creates a node notify_om_node.
>                 But after the node is created, there is no place to
>                 free this node. I can only find two places to free
>                 memory: axis2_svc_client_free and axutil_env_free. But
>                 after reading source code of these two functions, no
>                 one free the node created by function
>                 axiom_element_create. Did I miss something or the
>                 sample forget to free the node? If it is, how to free
>                 the node?
>         
>         I think we should document this somewhere. Anyway, once you
>         pass the payload to service client operation invocation, it
>         takes over the node ownership and frees it when service client
>         is freed.
>         
>         Thanks,
>         Samisa...
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: [EMAIL PROTECTED]
>         For additional commands, e-mail:
>         [EMAIL PROTECTED]
>         
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to