When to call NvBufferDestroy for buffer shared between processes

I am sending NvBuffer dmabuf fd’s between processes using the method described in this post.

When I am done using a buffer should I call NvBufferDestroy from both the sending and receiving process, or just from the process that uses the buffer last?

Also, to free a buffer should I only call NvBufferDestroy or also NvBufferReleaseFd?

Hi,
You would need to allocate NvBuffer in both receiving and receiving processes, so calling NvBufferDestroy() is required in both processes. Only calling NvBufferDestroy() is sufficient.