Do I need to release the temp Object from this example?
Posted
by Tattat
on Stack Overflow
See other posts from Stack Overflow
or by Tattat
Published on 2010-03-18T16:09:39Z
Indexed on
2010/03/18
16:31 UTC
Read the original article
Hit count: 324
-(IBAction) testTemp: (id) sender{
id tempObj;
tempObj = otherObject; //the otherObject will be released in dealloc method;
[tempObj doSomething];
}
As you can see, I use the tempObj for temp use. I won't use it after the user quit this method, should I need to release the tempObj? and why?
© Stack Overflow or respective owner