1FREELOCALE(3P) POSIX Programmer's Manual FREELOCALE(3P)
2
3
4
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
12 freelocale — free resources allocated for a locale object
13
15 #include <locale.h>
16
17 void freelocale(locale_t locobj);
18
20 The freelocale() function shall cause the resources allocated for a
21 locale object returned by a call to the newlocale() or duplocale()
22 functions to be released.
23
24 The behavior is undefined if the locobj argument is the special locale
25 object LC_GLOBAL_LOCALE or is not a valid locale object handle.
26
27 Any use of a locale object that has been freed results in undefined
28 behavior.
29
31 None.
32
34 None.
35
36 The following sections are informative.
37
39 Freeing Up a Locale Object
40 The following example shows a code fragment to free a locale object
41 created by newlocale():
42
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
64 None.
65
67 None.
68
70 None.
71
73 duplocale(), newlocale(), uselocale()
74
75 The Base Definitions volume of POSIX.1‐2017, <locale.h>
76
78 Portions of this text are reprinted and reproduced in electronic form
79 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
80 table Operating System Interface (POSIX), The Open Group Base Specifi‐
81 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
82 Electrical and Electronics Engineers, Inc and The Open Group. In the
83 event of any discrepancy between this version and the original IEEE and
84 The Open Group Standard, the original IEEE and The Open Group Standard
85 is the referee document. The original Standard can be obtained online
86 at http://www.opengroup.org/unix/online.html .
87
88 Any typographical or formatting errors that appear in this page are
89 most likely to have been introduced during the conversion of the source
90 files to man page format. To report such errors, see https://www.ker‐
91 nel.org/doc/man-pages/reporting_bugs.html .
92
93
94
95IEEE/The Open Group 2017 FREELOCALE(3P)