Confd_send_notification when memory is freed?

Hi Community,

Do you know how memory is freed after call API confd_notification_send() to send notifications?
From manpage, I can see the notification was queued for delivery. But when it will be freed?
In our notifier application, we register this notification stream without replay callbacks. After calling confd_notification_send() , we call confd_free_value() to free those values used in confd_notification_send(). What else need to do from notifier application side?

   confd_notification_send() is asynchronous and a CONFD_OK return value only states that the notification was successfully queued for delivery, the actual send operation can still fail and such a failure will be logged to ConfD's developerLog.

Managing the memory allocated for data is completely up to your application. When the call confd_notification_send completes, the library has already sent the data to ConfD and your application can free it. The statement that the function is asynchronous means that notification subscribers may not have received the notification yet - it may be still held by ConfD or somewhere on the wire etc.

But from test, compared with the one without calling confd_notification_send API, some memory is not freed after confd_notification_send completes.
Is it libconfd “pool allocator”?

No, libconfd does not keep pool of allocated memory to be used. The function confd_notification_send indeed allocates some internal memory, but it deallocates it (or tries to) before the call ends, so if you are saying that during the call to confd_notification_send an amount of memory is allocated and does not appear to be freed, it might indicate a memory leak. Are you able to run the code with a tool like valgrind?

No definitely lost found when running with valgrind.