d3d12: Suppress misleading leak report
authorSeungha Yang <seungha@centricular.com>
Sun, 15 Dec 2024 15:22:47 +0000 (00:22 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 16 Dec 2024 09:47:21 +0000 (09:47 +0000)
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>

subprojects/gst-plugins-bad/gst-libs/gst/d3d12/gstd3d12descheappool.cpp

index b32451f3e539bb773cb10ea610ad34a2b23e0a02..894ab63f5daee11e7f1865a6972269d154d92925 100644 (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);