Re: color "scribble-simple" eats up all memory & crashes



Cevat Ustun <ustun Glue umd edu> writes:
I have written a simple application that draws a series of points 
given a starting point and gradually fills the screen (based on 
scribble-simple.c from the gtk tutorials). The black &white version
works flawlessly but the color version quickly swells up all the 
memory taken by X and ultimately crashes. Why? 

You're leaking the graphics context, you have to free it. Also you
want to use gtk_widget_queue_draw(), not gtk_widget_draw() for
efficiency.

Havoc




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