Hacker News new | past | comments | ask | show | jobs | submit login

That wasn't "something vaguely resembling garbage collection" — it was a no-op until garbage collection was finally introduced half a decade later.

And NSZone was already out of favor when I started programming Cocoa, on OS X 10.1. It just didn't have any advantages under OS X's memory model. It certainly wasn't a preallocated object pool like this. As it was explained to me at the time, the main point of NSZone originally was that it let you to blow away the whole zone at once without needing to release every single object. This was no longer the case in 10.1 (and I don't think it was even the case in 10.0).




NSZone was born when memory was small and paging to disk was expensive & frequent. Zones were to help you group objects that would likely be used together onto the same virtual memory page so you could decrease the likelihood of thrashing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: