Does ARC work for all objects?

In the Book, I found a sentence that says that ARC only releases Object from Foundation. It's true? Therefore, if I have:

MySimpleClass *objectFromMySimpleClass = [MySimpleClass alloc] init];

Should I free objectFromMimSimpleClass? How can i do this? When i try

[objectFromMySimpleClass release];

I see unactive "release" in the Xcode hints, and then the compiler says that I cannot do this, because ARC. So what is going on?

And other. When I use NSCoping, should I also free an object when I use copy ?

+3
source share
2 answers

MySimpleClassinherits NSObject, therefore, this is a Foundation object, so it can be managed by ARC.

+5

, ARC Work , release .

+1

All Articles