[#BloombergLP-bslmt-ThreadUtil-deleteKey]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtil.adoc[ThreadUtil]::deleteKey
:relfileprefix: ../../../
:mrdocs:

Delete the specified process&hyphen;wide thread&hyphen;local key&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;threadutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
deleteKey(xref:BloombergLP/bslmt/ThreadUtil/Key.adoc[Key]& key);
----

== Description

Delete the specified `key` from the calling process, and disassociate all threads from the thread key cleanup function supplied when `key` was created (see `createKey`)&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined unless `key` was obtained from a successful call to `createKey` and has not already been deleted&period; Note that deleting a key does not delete any data referred to by the pointer values associated with that key in any thread&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| process&hyphen;wide thread&hyphen;local key to delete
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
