Back to index

libindicate  12.10.0
test-thousand-indicators-client.c
Go to the documentation of this file.
00001 
00002 #include <glib.h>
00003 #include "libindicate/indicator.h"
00004 
00005 static gboolean passed = TRUE;
00006 static GMainLoop * mainloop = NULL;
00007 
00008 static gboolean
00009 done_timeout_cb (gpointer data)
00010 {
00011        g_debug("All done.");
00012        g_main_loop_quit(mainloop);
00013        return FALSE;
00014 }
00015 
00016 int
00017 main (int argc, char * argv)
00018 {
00019        g_type_init();
00020 
00021        int i;
00022        for (i = 0; i < 1000; i++) {
00023               /* Memory leak :) */
00024               IndicateIndicator * indicator = indicate_indicator_new();
00025               indicate_indicator_show(indicator);
00026        }
00027 
00028        g_timeout_add_seconds(2, done_timeout_cb, NULL);
00029 
00030        mainloop = g_main_loop_new(NULL, FALSE);
00031        g_main_loop_run(mainloop);
00032 
00033        return !passed;
00034 }