[
https://issues.apache.org/jira/browse/SANDESHA2C-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586161#action_12586161
]
Damitha Kumarage commented on SANDESHA2C-27:
--------------------------------------------
Also we need to be fully aware where and how Axis2/C free msg_ctx and op_ctx
structures and soap envelopes.
- In the client application side when operation client is freed operation
context is freed. when operatoin context is freed both of it's in and out
message contexts are freed. It should be noted that when consecutive
application messages are sent using same service client, new operation clients
are created after freeing the previous operation client. This has interesting
consequences for rm_ping samples because while application message context is
held by Sandesha2/C until CreateSequenceResponse message is completed,
operation client is freed for that application message and so is op_ctx, if the
client send a second message before CreateSequenceResponse message come. If
client send the second rm_ping message with adequate pause then this should not
happen.
But we cannot expect so from the client. So my suggestion is when we store the
application message context we should mark operation context as in-use by
callled axis2_op_ctx_set_in_use() function. Currently for all mep cases ref is
incremented for op_ctx which is not good. We shoud mard it as set_in_use for
only one way case. At sandesha2_storage_remove_msg_ctx() function we can unset
this and free it.
Note that sandesha2_storage_remove_msg_ctx() is called for held application
message context when CreateSequenceResponse message complete so in this
function we can extract the op_ctx and free it.
- In server side message contexts and opeation contexts are freed at the end of
transport worker's process_request function. Note that there, before freeing
operation context, it's message contexts are freed.
- Soap envelopes are freed when message context is freed in Axis2/C so we need
not specifically worrry about this.
> Do memory leak fixes in Sandesha2c
> ----------------------------------
>
> Key: SANDESHA2C-27
> URL: https://issues.apache.org/jira/browse/SANDESHA2C-27
> Project: Sandesha2/C
> Issue Type: Bug
> Reporter: Damitha Kumarage
>
> Do memory leak fixes in Sandesha2
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]