From 56ee365077878819a0c4d938d9385bb18b5386b3 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 4 May 2016 13:53:56 +0200 Subject: [PATCH] (mini)object: add MAY_BE_LEAKED flag https://bugzilla.gnome.org/show_bug.cgi?id=766008 --- gst/gstminiobject.h | 4 ++++ gst/gstobject.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gst/gstminiobject.h b/gst/gstminiobject.h index bdb2e61..88eb080 100644 --- a/gst/gstminiobject.h +++ b/gst/gstminiobject.h @@ -124,6 +124,9 @@ typedef void (*GstMiniObjectNotify) (gpointer user_data, GstMiniObject * obj); * gst_mini_object_lock() and gst_mini_object_unlock(). * @GST_MINI_OBJECT_FLAG_LOCK_READONLY: the object is permanently locked in * READONLY mode. Only read locks can be performed on the object. + * @GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED: the object is expected to stay alive + * even after gst_deinit() has been called and so should be ignored by leak + * detection tools. (Since 1.10) * @GST_MINI_OBJECT_FLAG_LAST: first flag that can be used by subclasses. * * Flags for the mini object @@ -132,6 +135,7 @@ typedef enum { GST_MINI_OBJECT_FLAG_LOCKABLE = (1 << 0), GST_MINI_OBJECT_FLAG_LOCK_READONLY = (1 << 1), + GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED = (1 << 2), /* padding */ GST_MINI_OBJECT_FLAG_LAST = (1 << 4) } GstMiniObjectFlags; diff --git a/gst/gstobject.h b/gst/gstobject.h index ad033e8..1ca6063 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -41,12 +41,16 @@ G_BEGIN_DECLS /** * GstObjectFlags: + * @GST_OBJECT_FLAG_MAY_BE_LEAKED: the object is expected to stay alive even + * after gst_deinit() has been called and so should be ignored by leak + * detection tools. (Since 1.10) * @GST_OBJECT_FLAG_LAST: subclasses can add additional flags starting from this flag * * The standard flags that an gstobject may have. */ typedef enum { + GST_OBJECT_FLAG_MAY_BE_LEAKED = (1 << 0), /* padding */ GST_OBJECT_FLAG_LAST = (1<<4) } GstObjectFlags; -- 2.7.4