I am allocating an object like
A *a = [[A alloc] init];
At another point I am forcefully setting
a = nil;
Does it flash a message to ARC that the object can be released now?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Quick answer – YES.
Once you set your object to nil it will get killed by Arc (most of the cases, from my experience you can lay your trust on ARC)
Dealloc methods in arc will be created for you. You must not make a dealloc call directly. However you can still create a custom dealloc method if you need to release resources other than instance variables. When creating a custom dealloc method, do not call the [super dealloc] method. This will be done for you and is enforced by the compiler.
You can read more about it here