Re: Deleting an file that's been NSData memory mapped - safe?

2016-02-11 Thread Dan Lau
wrote: > > On Feb 11, 2016, at 11:44 AM, Dan Lau wrote: > > If a file has its contents mapped using NSData's > initWithContentsOfFile + NSDataReadingMappedIfSafe, > deleting it doesn't appear to affect reading it's mapped contents. Does > anyone know if NSData uses m

Deleting an file that's been NSData memory mapped - safe?

2016-02-11 Thread Dan Lau
If a file has its contents mapped using NSData's initWithContentsOfFile + NSDataReadingMappedIfSafe, deleting it doesn't appear to affect reading it's mapped contents. Does anyone know if NSData uses mmap(2) under the hood to ensure that this sort of operation is valid? Dan ___