title: When is it safe to call pthread_attr_destroy?
body: <p>I am using pthreads on Linux. From the documentation, it is not clear to me when it is safe to call <code>pthread_attr_destroy</code> on the attributes I use to create a new thread? Can I do it immediately after <code>pthread_create</code> returns or do I have to wait until the thread is joined or detached? </p>
  
  <p>Thanks in advance,
  Christoph</p>