Re: Memory leak in g_main



Jonas Bulow <jonas bulow servicefactory se> writes:

> 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

Works fine here - standard glib-1.2.8. (Red Hat Linux 7, glibc-2.2)

Have you tested the exact program above? What are your system
details?

Regards,
                                        Owen




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