Hi
I'm currently using Sofia to implement both a SIP client and a SIP server and registrar. For each, I'm using the NUA API. I create 2 separate NUAs, one for the client and one for the server. My server NUA appears to be endlessly accumulating memory and not releasing it, until the system eventually runs out of memory. So far, the main source of this appears to be the handles passed up with 'nua_i_register' events. When I've processed the inbound register events, I call nua_handle_destroy() to destroy the handles, but a bit of further debugging has revealed that the sub_ref count is >1 at the time on the su_home associated with the handle, so the home doesn't actually get freed. If I use an extra nua_handle_unref() to force the ref count down, the home gets freed and then I get a seg-fault shortly afterwards because some other part of Sofia is still trying to reference the memory. So I tried deferring the nua_handle_destroy() call instead by storing the handles on a list instead, and checking the ref count on each handle periodically until it drops to 1, but it never does. Is anyone else using the nua_i_register events in Sofia SIP? If so, has anyone else encountered this issue? I'm sure it must be an error in how I'm creating and configuring the server NUA instance, or in how I'm processing the nua_i_register() requests, but I just can't see it. Does anyone have any ideas about what else might be holding on to those nua handles for nua_i_register after I've processed the events and sent the 200 response with nua_respond()? Any help or suggestions would be much appreciated. Many thanks, -Dan
------------------------------------------------------------------------------
_______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel