NAME
TkFreeXId - make X resource identifier available for reuse
SYNOPSIS
##iinncclluuddee <
TTkkFFrreeeeXXIIdd((display, id)) AARRGGUUMMEENNTTSS Display *display (in) Display for which id was allocated. XID id (in) Identifier of X resource (window, font, pixmap, cursor, graphics context, or colormap) that is no longer in use.> DESCRIPTION
The default allocator for resource identifiers provided by Xlib is verysimple-minded and does not allow resource identifiers to be re-used.
If a long-running application reaches the end of the resource id space,
it will generate an X protocol error and crash. Tk replaces the default id allocator with its own allocator, which allows identifiers to be reused. In order for this to work, TTkkFFrreeeeXXIIdd must be called totell the allocator about resources that have been freed. Tk automati-
cally calls TTkkFFrreeeeXXIIdd whenever it frees a resource, so if you use pro-
cedures like TTkkGGeettFFoonntt, TTkkGGeettGGCC, and TTkkGGeettPPiixxmmaapp then you need not call TTkkFFrreeeeXXIIdd. However, if you allocate resources directly from Xlib, for example by calling XXCCrreeaatteePPiixxmmaapp, then you should call TTkkFFrreeeeXXIIdd when you call the corresponding Xlib free procedure, such as XXFFrreeeePPiixxmmaapp. If you don't call TTkkFFrreeeeXXIIdd then the resource identifier will be lost, which could cause problems if the application runs long enough to lose all of the available identifiers. KKEEYYWWOORRDDSS resource identifier Tk 4.0 TkFreeXId(3)