Re: Memory Leak with gtk_timeout_add



You missed two important characters...  There should be a '//' in
front of the gtk_timeout_add, commenting out that line.

>from a quick look at your source, I got the impression what you are 
>doing is essentially:
>
>gboolean 
>timeout_event (gpointer data)
>{
//  gtk_timeout_add (delay, timeout_event, data);
^^
>  gtk_timeout_add (delay, timeout_event, data);
>  return TRUE;
>}

One of the variations I tried is to return FALSE from the
timeout_event function, which should remove the old timeout, and
re-doing the gtk_timeout_add () every time.  My most recent experiment
has the timeout_event function: 

gint timeout_event( gpointer data)
{
#if 0
[...]
#endif
    return TRUE;
}

which still eats memory like crazy.

-davec






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