How to free all member in NvDsObjectMeta

i have use

        NvDsObjectMeta *dummy_obj_meta = (NvDsObjectMeta *) g_malloc0 (sizeof (NvDsObjectMeta));

        dummy_obj_meta->rect_params.width = ip_surf->surfaceList[frame_meta->batch_id].width;
        dummy_obj_meta->rect_params.height = ip_surf->surfaceList[frame_meta->batch_id].height;
        dummy_obj_meta->rect_params.top = 0;
        dummy_obj_meta->rect_params.left = 0;

in deepstream test5 app to save image but i don’t know how use g_free to free memory of all member in this object

i try with:

        g_free(dummy_obj_meta->rect_params.width)
        g_free(dummy_obj_meta->rect_params.height)
        g_free(dummy_obj_meta->rect_params.top)
        g_free(dummy_obj_meta->rect_params.left)
        g_free(dummy_obj_meta->rect_params)
        g_free(dummy_obj_meta)

or just:

        g_free(dummy_obj_meta)

but I don’t know all member was free or no

help me, thanks

Hey customer,
I think you should use nvds_acquire_obj_meta_from_pool to get the meta data from pool, refer Metadata Structures — Deepstream Deepstream Version: 5.0 documentation