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

DESCRIPTION

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

KEYWORDS

41       resource identifier
42
43
44
45Tk                                    4.0                        Tk_FreeXId(3)
Impressum