Why is the retainCount still 1 after [object release]?

后端 未结 5 1274
Happy的楠姐
Happy的楠姐 2021-01-19 07:13
NSLog(@\"first:%u\",[object retainCount]);
[object release];
NSLog(@\"second:%u\",[object retainCount]);

Output:

first:1
second:1
5条回答
  •  执念已碎
    2021-01-19 07:31

    Divide any number by zero and you will find the meaning of "object with retain count of zero".

提交回复
热议问题