Users Pricing

forum

home / developersection / forums / is condition is necessary before releasing instance

Is condition is necessary before releasing instance

Anonymous User 1649 03 Nov 2015

Whenever I release any instance that could exists or not, I am using this code:

if(myObject!=nil)
{
   [myObject release];
}

but I have a confusion, sending a message to nil is not a problem;
I want to know, is that condition necessary?


I am a content writter !


1 Answers

Tarun Kumar 04 Nov 2015 Accepted Answer