#include #define ITERS 100000 #include #include "mem.h" static GstElement* create_bin (void) { GstElement *bin; GstElement *element; bin = gst_bin_new ("testbin"); element = gst_element_new (); gst_element_set_name (element, "test1"); gst_bin_add (GST_BIN (bin), element); element = gst_element_new (); gst_element_set_name (element, "test2"); gst_bin_add (GST_BIN (bin), element); return bin; } int main (int argc, gchar *argv[]) { GstElement *bin; long usage1; gint i, iters; gst_init (&argc, &argv); if (argc == 2) iters = atoi (argv[1]); else iters = ITERS; g_print ("starting test\n"); usage1 = vmsize(); bin = gst_bin_new ("somebin"); gst_object_unref (GST_OBJECT (bin)); g_print ("create/unref new bin %ld\n", vmsize()-usage1); for (i=0; i