After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736477 - check: Add a function to check destruction of objects
check: Add a function to check destruction of objects
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-11 14:01 UTC by Thibault Saunier
Modified: 2014-09-12 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check: Add a function to check destruction of objects (3.94 KB, patch)
2014-09-11 14:01 UTC, Thibault Saunier
none Details | Review
New version of the patch, making the debug output more useful (4.03 KB, patch)
2014-09-11 14:13 UTC, Thibault Saunier
none Details | Review
check: Add a function to check destruction of objects (4.09 KB, patch)
2014-09-11 14:29 UTC, Thibault Saunier
needs-work Details | Review
check: Add a function to check destruction of objects (4.63 KB, patch)
2014-09-12 14:22 UTC, Thibault Saunier
committed Details | Review

Description Thibault Saunier 2014-09-11 14:01:06 UTC
Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).
Comment 1 Thibault Saunier 2014-09-11 14:01:09 UTC
Created attachment 285910 [details] [review]
check: Add a function to check destruction of objects
Comment 2 Thibault Saunier 2014-09-11 14:13:53 UTC
Created attachment 285914 [details] [review]
New version of the patch, making the debug output more useful

check: Add a function to check destruction of objects

Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).
Comment 3 Thibault Saunier 2014-09-11 14:29:58 UTC
Created attachment 285915 [details] [review]
check: Add a function to check destruction of objects

Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).
Comment 4 Sebastian Dröge (slomo) 2014-09-12 13:17:55 UTC
Review of attachment 285915 [details] [review]:

::: libs/gst/check/gstcheck.c
@@ +943,3 @@
+ * destroyed, also checks that the other objects passed in
+ * parametter have been destroyed as a concequence of
+ * unrefing @object_to_unref. Last variable argument should be NULL.

Please document that first_object can be NULL, and add a convenience function for that case :)

Also Since: 1.6

@@ +957,3 @@
+
+  if (first_object) {
+    va_list varargs;

I think you have to call va_start/end also if first_object is NULL but not sure.
Comment 5 Tim-Philipp Müller 2014-09-12 14:06:20 UTC
It would also be good if the name of the function reflected that this is about GObjects, one might want a similar function for buffers/events/miniobjects/whatever at some point in the future.
Comment 6 Thibault Saunier 2014-09-12 14:22:16 UTC
Created attachment 286044 [details] [review]
check: Add a function to check destruction of objects

Add a method letting people to ensure that unreffing one object
leads to its destruction, and possibly the destruction of more object
(think destruction of a GstBin etc...).
Comment 7 Thibault Saunier 2014-09-12 15:19:53 UTC
Attachment 286044 [details] pushed as 87a7967 - check: Add a function to check destruction of objects
Comment 8 Thibault Saunier 2014-09-12 15:20:32 UTC
commit 87a79673b0176cecbc10a6075466ffdede9e4d12
Author: Thibault Saunier <tsaunier@gnome.org>
Date:   Thu Sep 11 15:52:32 2014 +0200

    check: Add a function to check destruction of objects
    
    Add a method letting people to ensure that unreffing one object
    leads to its destruction, and possibly the destruction of more object
    (think destruction of a GstBin etc...).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736477