What is the meaning of the "zone" in copyWithZone :?

I looked through Chung's “Pro. Objective-C Design Patterns for iOS” and found

_sharedSinglton = [[super allocWithZone: NULL] init];

I looked at the Apple documentation for NSCopying , but cannot figure out what ZONE actually means.

+6
source share
1 answer

NSZone now deprecated, but in the days of NEXTSTEP NSZone was an attempt to bring the concept of "malloc zone" to Cocoa. Here are some documents that described how it worked when it was turned on: http://www.cocoadev.com/index.pl?NSZone

+7
source

Source: https://habr.com/ru/post/906079/


All Articles