[this is technically true on the Mac, but your Mac app isn't going to get jetsam'd like your iOS app will]
[this is technically true on the Mac, but your Mac app isn't going to get jetsam'd like your iOS app will]
Further the pages themselves (for a large allocation) don't all get touched when freed so the kernel can skip decompressing them.
Measure the behavior of your application. Most of the time freeing cached values is the correct response to memory pressure, or use things like NSCache that handle it for you.
You honestly shouldn't use NSCache as nobody understands what it does, or tests its eviction behavior, and what it actually does - evict everything under memory pressure - is probably the time you want your cache to work.
I can imagine destructors in most languages involving touching the memory, just curious if a free syscall alone does it or not.
It's better to free things as you go rather than wait for warnings.
$ man 2 intro | grep -w 17
17 EEXIST File exists. An existing file was mentioned in an inappropriate