Explain difference between release and autorelease?



Explain difference between release and autorelease?..

Answer / Krishna Kumar Tiwari

In Objective-C, both 'release' and 'autorelease' are methods used to manage memory. 'Release' decrements the retain count of an object by 1, while 'autorelease' also sets the object's autorelease pool (a temporary area where objects are stored before they are deallocated). The difference is that 'release' does not automatically add the object to an autorelease pool and must be handled manually, while 'autorelease' does this automatically.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

What devices will support ios 7?

1 Answers  


Explain shallow copying and depth copying.

1 Answers  


What kind of database is realm?

1 Answers  


Explain the application lifecycle in ios?

1 Answers  


How to edit iphone code

1 Answers  


What is a protocol in objective-c programming language?

1 Answers  


Is ios multithreading?

1 Answers  


What are ios apps written in?

1 Answers  


What are most ios apps written in?

1 Answers  


What is the maximum byte-size for a push notification to apple server?

1 Answers  


What is wildcard app ids?

1 Answers  


What is nspersistentstore? Is it thread safe?

1 Answers  


Categories