///////////////////////////////////////////////////////////////////////
//
// The following routines help fix a problem with the leaking of Windows
// Device Context (DC) objects. The 'proper' protocol is for a program to
// acquire a DC, save its state, do the modifications needed for drawing,
// perform the drawing, restore the initial state, and release the DC. In
// FLTK, the save and restore steps have previously been omitted and DCs are
// not properly released, leading to a great number of DC leaks. As some
// Windows "OSs" will hang when any process exceeds roughly 10,000 GDI objects,
// it is important to control GDI leaks, which are much more important than memory
// leaks. The following struct, global variable, and routines help implement
// the above protocol for those cases where the GetDC and RestoreDC are not in
// the same routine. For each GetDC, fl_save_dc is used to create an entry in
// a linked list that saves the window handle, the DC handle, and the initial
// state. When the DC is to be released, 'fl_release_dc' is called. It restores
// the initial state and releases the DC. When the program exits, 'fl_cleanup_dc_list'
// frees any remaining nodes in the list.