[Sofia-sip-devel] nua_respond and deallocated memory

2010-03-03 Thread Martin Drasar
Hello everyone, I have a question regarding the nua_respond() function. I have encountered a problem with this construct: void doSomething() { std::string message; switch() { case a: message = "something"; break; case b: message = "soemthing else"; break; } nua_respond(nh, st

Re: [Sofia-sip-devel] nua_respond and deallocated memory

2010-03-03 Thread Jarod Neuner
Calls to nua_respond, or any other method that sends or receives a response, should always be considered an async operation. A reasonable approach would be to use the memory home associated with that handle (nua_handle_home) to allocate the data - the data would be automatically released when t