You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ji...@apache.org> on 2007/03/29 12:09:25 UTC

[jira] Resolved: (AXIS2C-447) AXIOM_STAX_BUILDER_FREE releases built document

     [ https://issues.apache.org/jira/browse/AXIS2C-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Samisa Abeysinghe resolved AXIS2C-447.
--------------------------------------

    Resolution: Fixed
      Assignee: Samisa Abeysinghe

A workaroud for this is to set the stax builder as a property in the message context, along with the free method. As the massage context is freed at the end of serving the request, this instance of the stax builder will live till the end of the request and get freed when message context frees its properties.

An example of how to set the property can be found on line number 248 of http_sender.c where the http client instance is set as a property to be freed in a similar fashoin

> AXIOM_STAX_BUILDER_FREE releases built document
> -----------------------------------------------
>
>                 Key: AXIS2C-447
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-447
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/parser
>    Affects Versions: Current (Nightly)
>         Environment: Linux / simple_http_client
>            Reporter: Marc Giger
>         Assigned To: Samisa Abeysinghe
>             Fix For: 1.0.0
>
>
> In my webservice I build a document with the stax_builder (as in the documentation explained):
> builder = axiom_stax_builder_create(env, reader);
> document = AXIOM_STAX_BUILDER_GET_DOCUMENT(builder, env);
> payload = AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document, env);
> AXIOM_DOCUMENT_BUILD_ALL(document, env);
> then I return the root node back to the client.
> If I call the Macro AXIOM_STAX_BUILDER_FREE to release the resources from stax_builder it releases
> the built document too, and the axis engine tries to serialize the freed OM-Tree.
> If I don't call AXIOM_STAX_BUILDER_FREE, I have memory leaks...
> Shouldn't the document be freed in a separate step if needed?
> Thanks
> Marc

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org