User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 When running for a longer time, one day or so, cpugraph is using about 35mb of memory. The following fixed it for me: --- cpu.c.old 2006-08-09 11:02:40.446805504 +0200 +++ cpu.c 2006-08-09 01:26:29.950955461 +0200 @@ -244,7 +244,7 @@ void UpdateTooltip (CPUGraph * base) { - char tooltip[32]; + static char tooltip[32]; sprintf (tooltip, "Usage: %ld%%", base->m_CPUUsage); gtk_tooltips_set_tip (GTK_TOOLTIPS (base->m_Tooltip), Reproducible: Always Steps to Reproduce:
It's better to free the tooltip: void UpdateTooltip (CPUGraph * base) { gchar *tooltip; tooltip = g_strdup_printf ("Usage: %ld%%", base->m_CPUUsage); gtk_tooltips_set_tip (GTK_TOOLTIPS (base->m_Tooltip), base->m_FrameWidget->parent, tooltip, NULL); g_free (tooltip); } Maybe "char tooltip[32]" > "const char tooltip[32]" will also work.
Ehm, that's definitely not the cause of a memory leak.
ok, you're right. the problem only appears when using LED-mode. everything is fine in normal mode.
the DrawGraph function doesn't unref all the GdkGC it can create maybe it could be the cause of such memleak
Created attachment 740 Free gc's In two modes a gc isn't freed after use. This was the only obvious memory leak I could find, but I didn't look very thoroughly.
Ok, I committed the changes with revision 1906. It would be helpful if you could test the patch or update from SVN.
the patch did it for me
Fixed according to the comments, so I'm closing this report.