Hi Pekka, >> More than probably, it's my fault, but I am getting tons of memory leaks >> in my NTA-based application (using sofia-sip v1.12.8). The worst one is >> reported by valgrind like this: >> >> ==31415== 8,795,284 (1,302,928 direct, 7,492,356 indirect) bytes in >> 2,692 blocks are definitely lost in loss record 20 of 22 >> ==31415== at 0x4023DE2: calloc (vg_replace_malloc.c:397) >> ==31415== by 0x40FEA01: su_home_new (su_alloc.c:551) >> ==31415== by 0x407B35C: msg_create (msg.c:61) > > Incoming messaages are not disposed.. > >> I am using stateful NTA agent, and I destroy all the incoming >> transactions with nta_incoming_destroy() and all the call legs with >> nta_leg_destroy(). Is there something I am missing? > > Do you use nta_incoming_getrequest() or nta_outgoing_getresponse()? > You should use msg_destroy() with them.
So nta_incoming_getrequest() just increments the reference count, and msg_destroy() decrements it, right? msg_destroy() was missing, thanks! > >> I read that nta_incoming_destroy() won't deallocate the resources >> directly, but mark them as disposable, to be removed in a timeout. >> What's the frequency of that timeout? > > The transactions are kept around for 5 seconds. The timeout frequency > is dynamic. > Thanks, I can see debug messages notifying the timeout callback execution when enabling environmental variable SOFIA_DEBUG=9. Cheers, -Aleksander ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel