VM Stack category Persistent pthread_create & pthread_join

Device: Iphone XR(ios 14.2)

XCode: 13.4.1

Tools: Instrument -- Allocations

When I use 'Allocations' to check memory leak, I found that VM:Stack retains many pthread_create or pthread_join that have not been released. (pthread_create is call by POSIX API directly or std::thread)

I make sure that each thread calls pthread_create and pthread_join in pair(no thread exited without thread_join).

But ‘Allocation’ VM:Stack Category shows that something created in pthread_create and something created in pthread_join not released.

So, that things created by pthread_create or pthread_join will recycle by system later ?

I'm seeing this apparent leak too, on macOS. Hard to tell if it's a real leak or instruments being weird. -Ken

VM Stack category Persistent pthread_create & pthread_join
 
 
Q