Common Graphics : Resource management summary

Resource management summary
Most Common Graphics resources need to be explicitly deallocated when no longer required, otherwise operating system resources are lost and will eventually run out. This includes fonts, pixmaps, color cells, graphics contexts, cursors, and icons.
Often the best place to deallocate graphics resources is in a destroy callback handler for the drawing area widget in which graphics are being drawn. See "Drawing area widgets" for more information.
The following table summarizes when and how to free graphics objects allocated by the application:
Table 27. Graphics object freeing reference