Memory Leak with gtk_timeout_add



I was experimenting with some simple animation using gtk_timeouts to
trigger drawing the next frame, when I discovered that all my RAM and
swap were being occupied by the animation program.  

I poked around a bit with the g_lib g_mem_profile function which
verified that I was freeing everything I was allocating after the
initial setup.  

A copy of the test program can be fetched from
http://davec.ath.cx/t2.tar.gz

Watching in /proc/<PID>/maps I can see the memory get used up.
I cans see the allocations ot the regions in my draw_default()
function keep rising as well.   

What's going on?

-davec




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