axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subra Aswathanarayanan" <>
Subject freeing up memory after sending response
Date Tue, 23 Dec 2008 00:03:18 GMT

I have a webservice in which I allocate memory for a variable and then use
that variable in creating a soap response like this

        objType_om_ele = axiom_element_create(env, response_node,
OBJECT_TYPE, ns, &objType_om_node);
        axiom_element_set_text(objType_om_ele, env, objectType,

here the variable "objectType" was malloc'd using AXIS2_MALLOC function.

in the end i return response_node and the client receives the soap response.

my question is, when should i free the memory that i allocated. i dont think
i can free it before i return "response_node" and i cant free it after the
return statement either.

your help is much appreciated!


View raw message