axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dinesh Premalal <>
Subject Re: free memory after invoke web service
Date Sat, 09 Dec 2006 06:10:39 GMT
Hi Yong,
        please see my comments inline
Yong Yang <> writes:

> Hi, I would like to free these memories that are dynamically allocated using env->allocator
in my client program. For example, there are the following structures
>     1) axis2_env* env
>     2) axis2_options_t* options
>     3) axis2_endpoing_ref_t* endpoint_ref
>     4) axis2_svc_client_t* svn_client
>     5) axis2_namespace_t* name_space[]
>     6) axis2_node_t* payload
>     7) axis2_node_t* return_node
> If I first free svn_client, then payload, name_space,
> return_node,..,env. there is a segmentation fault when I tried to
> free name_space.
when u pass payload to svc client (through svc_client_create) ,
svc_client will get the owneship of  that payload. According to my
knowledge freeing svc_client should do the freeing of payload also.
> But If I first free payload, name_space, return_node,
> svn_client,..., env, there is a segmentation fault when I tried to
> free svn_client.
yes..that should be , svc_client going to free payload again. 
> May I know which struture I should explcitly deallocate? Do I need
> to free some of these kind of structures in my server program
> explicitely ?
I think calling AXIS2_SVC_CLIENT_FREE and axis2_env_free would be fine.
BTW way if you feel there is memory leaks remains, we alway welcome a
jira report with valgrind memory leak report.

please follow the way our samples wrote. Because we were able to hit
memory leak 0 with those samples. 


Dinesh Premalal
WSO2, Inc.;
GPG Key ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message