GNOME Bugzilla – Bug 736477
check: Add a function to check destruction of objects
Last modified: 2014-09-12 15:20:32 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...).
Created attachment 285910 [details] [review] check: Add a function to check destruction of objects
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...).
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...).
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.
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.
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...).
Attachment 286044 [details] pushed as 87a7967 - check: Add a function to check destruction of objects
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