[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[osip-dev] alloc and free of dnsutils_list

From: FEICHTER Christoph
Subject: [osip-dev] alloc and free of dnsutils_list
Date: Tue, 3 Feb 2015 11:46:55 +0000

I have a question regarding dnsutils_list.
this variable is allocated on the first use, and all
eXosip instances share the same dnsutils_list
but it is never freed – that’s an unclean memory handling.
I guess there are 2 possible solutions:
  1. dnsutils_list remains static – to be used by all instances
    then we need a counter for the number of instances (incremented in eXosip_initialize, decremented in eXosip_quit).
    additionally you would require a mutex to synchronize
    when eXosip_initialize and eXosip_quit are called from various threads.
  2. every eXosip instance gets its own dnsutils_list.
    then we don’t need the conter and synchronization – but the instances
    don’t share a common dnsutils-list.
which solution would you prefer ?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]