Re: pthread resources
On 2000-03-03 13:42:27, Michael Kelly wrote:
> On Fri, 3 Mar 2000, Allan M. Wind wrote:
Yes. It (p. 190) states that exit, return from main or fatal signal
terminates threads. Wondering if there's only two conditions for
libraries...
(automatic) variables going out of scope is most likely bad news:
{
char *t = "some text";
pthread_t p;
ptread_create(&p, 0, &f, (void *) t);
}
which should be replaced by heap allocated memory that is deallocated
in the new thread.
Interesting.
/Allan
--
Allan M. Wind Finger: wind@digit-safe.dyndns.org (GPG/PGP)
P.O. Box 2022 Email: wind@freewwweb.com
Woburn, MA 01888-0022 ICQ: 44214251
USA Phone: 781.279.4513
Reply to: