[comp.windows.x] XFreeGC

csmoe@mtsu.EDU (Monisha Guglani) (03/24/91)

	I'm new to X so pardon me if I'm asking something silly.

	I'm using Xlib routines (no toolkit) in my popup window
	and I open windows, create GC's for my window and subwindows
	and draw into them and write into them and when I'm ready to quit
	my program goes through a process of freeing GC's font's
	etc.. However XFreeGC dumps core sometimes. 
	I even get problems when I'm trying to XDestroyWindow.
	Its not even consistent as to where it dumps core.
	It dumps core only when it gets to
	my free routine which looks something like this:
	.
	.
	.
	.
	my_free_routine()
	{
	XFreeFont( mydisp, myfont)'
	XFreeCursor(mydisp, mycursor );
	XFreeGC( mydisp, mygc1);
	XFreeGC( mydisp, mygc2);
	XFreeGC( mydisp, mygc3);
	XFreeGC( mydisp, mygc4);
	XDestroySubwindows( mydisp, mywin);
	XDestroyWindow( mydisp, mywin);
	XFlush( mydisp);'
	}


	Is there something in particular I need to do before I destroy
	windows and free GC's that I'm missing here.

	Any suggestions or comments would be appreciated! Thankx!
-- 
/**************************************************************/
/*       csmoe@knuth.mtsu.edu        Monisha Guglani          */	   
/* "I haven't lost my mind its backed-up on a tape somewhere" */
/**************************************************************/