(mini)object: add MAY_BE_LEAKED flag
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 4 May 2016 11:53:56 +0000 (13:53 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 20 May 2016 08:11:08 +0000 (09:11 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=766008

gst/gstminiobject.h
gst/gstobject.h

index bdb2e61..88eb080 100644 (file)
@@ -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;
index ad033e8..1ca6063 100644 (file)
@@ -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;