On Wed, Jun 03, 2015 at 01:54:40PM +0200, Justus Winter wrote:
> I independently rediscovered that host port leak.  I see two options
> how to proceed:

The host and task ports actually don't leak, because they're unique to
a task, and Mach treats them as exceptions by never overruning the user
space ref count. This means that calling mach_host_self() a lot of times
results in a single name with a very high ref count, and nothing else.
This is the expected behaviour.

On the other hand, threads die in a task, and not releasing names
obtained with mach_thread_self() is indeed a leak. This was the main
difficulty with thread destruction in libpthread. I don't remember
if there were leaks elsewhere.

-- 
Richard Braun

Reply via email to