引用计数与所有权计数相同吗?

Is reference counting the same as ownership counting?

考虑以下来自 "Big Nerd Ranch: Objective-C Programming" - 第 21 章:对象实例变量和属性的语句:

When an object has an object instance variable, the object with the pointer is said to own the object that is being pointed to.

现在考虑以下场景:

#import <Foundation/Foundation.h>

int main(int arc, const char * argv[])
{
    @autoreleasepool {
        NSString *message = @"Hello, world!";
    }
    return 0;
}

此处,消息 对象具有一 (1) 个引用。但是...它有任何所有者吗?

如果我们严格遵守引用的定义,则没有 对象的指针 引用此 NSString。这是否意味着 message 有一 (1) 个参考但没有 (0) 个所有者?

而且,如果是这种情况,ARC 在决定是否释放对象时会考虑什么?引用计数还是所有权计数?

引用计数只是对象维护的一个数字。

所有权是一种政策,几乎是一种哲学。它是一种思维方式,试图确保您连贯地干预对象的引用计数。