memory leak with thread

Moritz Julen moju@hotmail.com
Thu Dec 16 09:40:00 GMT 1999


hello
when I create a thread and then exit it, I have a memory leak of
8160KB...
I do this:

void * ThreadInterface(void * ptrVoid)
{   
  // set the real time signal handler
  signal(SIGALRM, TimeoutHandler);
  cout<<"!!end thread interface!!\n";
  pthread_exit(0);
}


int main(void)
{
  pthread_t thInterface;
  pthread_attr_t thattrInterface;

  pthread_attr_init( (pthread_attr_t *)&thattrInterface);
  pthread_create(&thInterface, (pthread_attr_t *)&thattrInterface,
&ThreadInterface, NULL);
  pthread_join(thInterface, NULL);
  return EXIT_SUCCESS;
}


More information about the Gcc-help mailing list