hello,
Sometimes I need to allocate memory and init it in the service
and use it in MTOM callback lib. But when doing like this, I will lose
the control of the memory, because on some platform like Windows there
is some troubles to free memory allocated from other libs. So I think the
best way is to allocate the memory and bind it to msg_ctx with AXIS2_SCOPE_REQUEST
scope type, then it will be released automaticly by axis2.
The problem is that the memory is freed before sending MTOM now by mod_axis2.
The code is just like:
axis2_apache2_worker_process_request (...) {
do something ...
axis2_msg_ctx_free(...mst_ctx...)
apache2_worker_send_mtom_message(...)
}
Can someone give me any suggestions. |