Multithreaded Programming Guide

Destroy Attributes


Use pthread_attr_destroy(3T) to remove the storage allocated during initialization. The attribute object becomes invalid.

int	pthread_attr_destroy(pthread_attr_t *tattr);
#include <pthread.h>

pthread_attr_t tattr;
int ret;

/* destroy an attribute */
ret = pthread_attr_destroy(&tattr); 

Return Values

pthread_attr_destroy() returns zero after completing successfully. Any other returned value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.


Indicates that the value of tattr was not valid.