1Tk_FreeXId(3)                Tk Library Procedures               Tk_FreeXId(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_FreeXId - make X resource identifier available for reuse
9

SYNOPSIS

11       #include <tk.h>
12
13       Tk_FreeXId(display, id)
14

ARGUMENTS

16       Display   *display   (in)      Display for which id was allocated.
17
18       XID       id         (in)      Identifier  of X resource (window, font,
19                                      pixmap,  cursor,  graphics  context,  or
20                                      colormap) that is no longer in use.
21_________________________________________________________________
22
23

DESCRIPTION

25       The default allocator for resource identifiers provided by Xlib is very
26       simple-minded and does not allow resource identifiers  to  be  re-used.
27       If a long-running application reaches the end of the resource id space,
28       it will generate an X  protocol  error  and  crash.   Tk  replaces  the
29       default  id  allocator with its own allocator, which allows identifiers
30       to be reused.  In order for this to work, Tk_FreeXId must be called  to
31       tell  the allocator about resources that have been freed.  Tk automati‐
32       cally calls Tk_FreeXId whenever it frees a resource, so if you use pro‐
33       cedures  like  Tk_GetFont, Tk_GetGC, and Tk_GetPixmap then you need not
34       call Tk_FreeXId.  However, if  you  allocate  resources  directly  from
35       Xlib,  for  example  by  calling  XCreatePixmap,  then  you should call
36       Tk_FreeXId when you call the corresponding Xlib free procedure, such as
37       XFreePixmap.  If you don't call Tk_FreeXId then the resource identifier
38       will be lost, which could cause problems if the application  runs  long
39       enough to lose all of the available identifiers.
40
41

KEYWORDS

43       resource identifier
44
45
46
47Tk                                    4.0                        Tk_FreeXId(3)
Impressum