Memory leak in g_main



Hi,

I'm sure I am missing something simple and obvious but why do the
following program eat (leak) memory very fast:

#include <glib.h>

GMainLoop *mloop = NULL;

gboolean
periodic_handle(gpointer data)
{
  return TRUE;
}

int
main(int argc, char **argv)
{
  mloop = g_main_new(FALSE);
  g_timeout_add(1, periodic_handle, NULL);

  g_main_run(mloop);

  return 0;
}

I am using glib-1.2.8




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]