1FREELOCALE(3P)             POSIX Programmer's Manual            FREELOCALE(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       freelocale — free resources allocated for a locale object
14

SYNOPSIS

16       #include <locale.h>
17
18       void freelocale(locale_t locobj);
19

DESCRIPTION

21       The freelocale() function shall cause the  resources  allocated  for  a
22       locale  object  returned  by  a  call to the newlocale() or duplocale()
23       functions to be released.
24
25       The behavior is undefined if the locobj argument is the special  locale
26       object LC_GLOBAL_LOCALE or is not a valid locale object handle.
27
28       Any  use  of  a  locale object that has been freed results in undefined
29       behavior.
30

RETURN VALUE

32       None.
33

ERRORS

35       None.
36
37       The following sections are informative.
38

EXAMPLES

40   Freeing Up a Locale Object
41       The following example shows a code fragment to  free  a  locale  object
42       created by newlocale():
43
44           #include <locale.h>
45           ...
46
47           /* Every locale object allocated with newlocale() should be
48            * freed using freelocale():
49            */
50
51           locale_t loc;
52
53           /* Get the locale. */
54
55           loc = newlocale (LC_CTYPE_MASK | LC_TIME_MASK, "locname", NULL);
56
57           /* ... Use the locale object ... */
58           ...
59
60           /* Free the locale object resources. */
61           freelocale (loc);
62

APPLICATION USAGE

64       None.
65

RATIONALE

67       None.
68

FUTURE DIRECTIONS

70       None.
71

SEE ALSO

73       duplocale(), newlocale(), uselocale()
74
75       The Base Definitions volume of POSIX.1‐2008, <locale.h>
76
78       Portions  of  this text are reprinted and reproduced in electronic form
79       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
80       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
81       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
82       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
83       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
84       event of any discrepancy between this version and the original IEEE and
85       The Open Group Standard, the original IEEE and The Open Group  Standard
86       is  the  referee document. The original Standard can be obtained online
87       at http://www.unix.org/online.html .
88
89       Any typographical or formatting errors that appear  in  this  page  are
90       most likely to have been introduced during the conversion of the source
91       files to man page format. To report such errors,  see  https://www.ker
92       nel.org/doc/man-pages/reporting_bugs.html .
93
94
95
96IEEE/The Open Group                  2013                       FREELOCALE(3P)
Impressum