d3d12: Suppress misleading leak report

Set may-be-leaked flag to child objects if needed,
since the parent object holding refcount of the child
will be leaked intentionally

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8152>
This commit is contained in:
Seungha Yang 2024-12-16 00:22:47 +09:00 committed by GStreamer Marge Bot
parent 1dd8085254
commit 9962c57b5b

View file

@ -206,6 +206,8 @@ gst_d3d12_desc_heap_pool_acquire (GstD3D12DescHeapPool * pool,
}
new_heap = gst_d3d12_desc_heap_new (heap.Get ());
if (GST_OBJECT_FLAG_IS_SET (pool, GST_OBJECT_FLAG_MAY_BE_LEAKED))
GST_MINI_OBJECT_FLAG_SET (new_heap, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
}
new_heap->pool = (GstD3D12DescHeapPool *) gst_object_ref (pool);