Destroys the specified key.
#include <nks/thread.h> int NXKeyDelete ( NXKey_t key;
(IN) Specifies the key to destroy.
If successful, returns 0; otherwise, returns a nonzero error code:
NXKeyDelete frees up a previously allocated key, which results in revoking the slot number that was reserved in the CSD array of all contexts. Contexts cannot manipulate the value that is associated with the key.
WARNING:When a key is deleted, any associated destructor is not called. You must clean up any values that contexts may have associated with the key before that key is deleted.
Usually, you do not need to destroy a key. When a thread exits, the destructor is automatically called to destroy key values associated with that thread. When the last thread of your VM exits, the destructor is called for the last time and the key is automatically destroyed.
For sample code, see KeyValue.c.