toggle quoted messageShow quoted text
No. It is correct. Both new and alloc are + methods since they act on the class, and not an object. If you think about it, there is no object to message when you use them.
From the docs:
This method is a combination of
alloc, it initializes the
isa instance variable of the new object so it points to the class data structure. It then invokes the
init method to complete the initialization process.
From the release notes
> Clang now infers the availability of
+new from availability annotations on
[[Foo alloc] init],
+new isn’t available unless
+init is available. (75884815)
+init? Is this a typo in the release notes??
Thanks in advance.