You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Brody Lodmell <br...@gmail.com> on 2010/01/20 17:10:34 UTC

Re: RE : Memory management process unclear

thank you, that helps a lot.
I dont know how I didn't find this before.

On 1/20/10, Olivier Mengué <om...@oxymel.com> wrote:
> It looks like you should use AXIS2_FREE().
>
> From samples/client/google/google_client.c:
>
>     buffer = axiom_node_to_string(google_om_node, env);
>     printf("%s\n", buffer);
>     AXIS2_FREE (env->allocator, buffer);
>
>
>
> -------- Message d'origine--------
> De: Brody Lodmell [mailto:brodylodmell@gmail.com]
> Date: mar. 19/01/2010 21 h 21
> À: axis-c-user@ws.apache.org
> Objet : Memory management process unclear
>
> we're using axis2 to consume soap services.
>
> this function
> axiom_node_to_string
>   AXIS2_EXTERN axis2_char_t *AXIS2_CALL
>   axiom_node_to_string(
>       axiom_node_t * om_node,
>       const axutil_env_t * env);
> declared in \axiom\include\axiom_node.h and defined in
> \axiom\src\om\om_node.h
>
> returns a different address each time I call it, indicating it might
> be dynamically allocated memory.  but when I try to free it, I get
> errors.
> I can't find any documentation on how this memory might be freed.
>
> is it the job of axiom_node_free_tree()?
>
> any insight anyone can provide would be helpful.
>
>