Why zone is always nil while implementing NSCopying?

前端 未结 5 1415
慢半拍i
慢半拍i 2021-02-13 04:47

It may be simple question, but why implementing NSCopying protocol in my class, I get zone == nil

- (id)copyWithZone:(NSZone *)zone
{
    if (zo         


        
5条回答
  •  悲&欢浪女
    2021-02-13 05:23

    A NULL zone just means 'use the default zone'. Zones aren't used by the modern Objective C runtime anymore and cannot be used with ARC at all.

    See documentation

提交回复
热议问题