Name
XtReleaseGC — deallocate a shared GC when it is no longer needed.
Synopsis
void XtReleaseGC(object, gc)
Widget object;
GC gc;
Arguments
objectSpecifies any object on the display for which the GC was created; may be of class Object or any subclass thereof.
gcSpecifies the GC to be deallocated.
Description
XtReleaseGC disassociates an application from a GC allocated with XtGetGC. XtReleaseGC supersedes XtDestroyGC and must be used instead of XtDestroyGC if the application is using XtGetGC on multiple displays.
The Intrinsics maintain reference counts of sharable GCs allocated by XtGetGC. The Intrinsics do not actually pass a free request to the server until the last user of a GC in an application releases it.
The Intrinsics use a caching mechanism for sharable read-only GCs. This is explained in Chapter 6, Basic Widget Methods, in Volume Four, X Toolkit Intrinsics Programming Manual.