Re: Leaking Mach Ports?
Re: Leaking Mach Ports?
- Subject: Re: Leaking Mach Ports?
- From: Dirk Musfeldt <email@hidden>
- Date: Fri, 11 Mar 2005 13:19:19 +0100
Chris,
>> One thing seems to be that from every pthread remains a port. Is that
>> leaked? How can I release that port?
>
> Are you creating the threads with the "detached" attribute or calling
> pthread_join()? If not, that's probably a good explanation for your
> leaks.
>
After calling pthread_create() and pthread_detach() MachPortDump shows these
additional ports:
0x6303 3
0x6403 1
0x6503 1 1
0x6603 1
0x6703 1
This makes up for five ports with a total of 4 send rights, 3 receive rights
and a PortSet. 0x6303 is the result for mach_thread_self() in this example.
After terminating the thread these rights still exist:
0x6303 2
which gives 2 DeadName rights.
How could I care for releasing these references?
Regards
Dirk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden