Deallocates a CS_LOCALE structure.
CS_RETCODE cs_loc_drop(context, locale) CS_CONTEXT *context; CS_LOCALE *locale;
A pointer to the CS_CONTEXT structure that represents the context in which the CS_LOCALE was allocated.
A pointer to a CS_LOCALE structure.
cs_loc_drop returns:
Returns |
Indicates |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
A CS_LOCALE structure contains localization information.
Once a CS_LOCALE structure has been deallocated, it cannot be used again. To allocate a new CS_LOCALE structure, an application can call cs_loc_alloc.
An application should take care to ensure that it does not deallocate a CS_LOCALE structure that is still in use. A CS_LOCALE structure is considered to be in use if a CS_DATAFMT structure references it.
An application can deallocate a CS_LOCALE structure after calling cs_config or ct_con_props to set the CS_LOC_PROP property for a context or connection. This is because cs_config and ct_con_props copy information from the user-supplied CS_LOCALE structure rather than setting up direct references to it.