What is responsible for freeing batch level user metadata

• Hardware Platform (Jetson / GPU)
all of the above
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
4.4
• TensorRT Version
7.1
• NVIDIA GPU Driver Version (valid for GPU only)
440.64.00

In my pipeline I’m attaching batch level user metadata to batch_meta->batch_user_meta_list

I’ve attached copy and release functions for the metadata, as well as a custom type. My question is: what is responsible for calling the release function? Is it the broker element, is this somehow handled at the end of the pipeline by gstreamer, or something else?

I want to use a custom broker element suitable to my purpose (call a python callback with my string payload), and I want to make sure I don’t leak memory.

Hi
It should be handled when pipeline running into end.
you can refer to sample deepstream-infer-tensor-meta-test for how to use copy/release function.

Ty, @amycao,

Are you sure that’s the right example? Unless the search function is failing me, I don’t see any use of a custom release function in that file.

I attached such functions to the buffer like in the custom metadata example (deepstream_user_metadata_app.c). in that example something in the pipeline calls it, but what exactly isn’t specified. Are you saying this happens automatically at the end of the pipeline?

Oh, sorry, see wrong, it’s this example, sources/apps/sample_apps/deepstream-user-metadata-test::release_user_meta
yes, at the end of the pipeline.

1 Like

Thanks, @amycao !