locale_t duplocale(locale_t locale);
Duplicates an existing locale returning a new locale_t that refers to
the same locale values but has an independent internal state. Various
functions, such as mblen() require a persistent state. These functions
formerly used static variables and calls to them from multiple threads
had undefined behavior. They now use fields in the locale_t associated
with the current thread by uselocale(). These calls are therefore only
thread safe on threads with a unique per-thread locale. The locale
returned by this call must be freed with freelocale().
The function conforms to IEEE Std 1003.1-2008 'POSIX.1'
- freelocale(), localeconv(), newlocale(), querylocale(), uselocale(), xlocale()
PTC MKS Toolkit 10.3 Documentation Build 39.