What is the difference between 'assign' and 'retain' keyword?



What is the difference between 'assign' and 'retain' keyword?..

Answer / Pankaj Kumar Bhurji

'Assign' is a memory management strategy that creates a new object if the receiver is nil, or copies an existing object using a specified copying function. 'Retain', on the other hand, increases the retain count of an object by one, preventing it from being deallocated.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

What is the 'interface' and 'implementation'?

1 Answers  


What is uiviewcontroller in ios?

1 Answers  


Explain how an autorelease pool works at the runtime level in iOS

1 Answers   SwanSoft Technologies,


Why do we need to use @Synthesize in iOS operating system?

1 Answers   TryTechnicals Pvt Ltd,


What is iphone?

1 Answers  


What is arc ios?

1 Answers  


What are the requirements for developing iphone apps?

1 Answers  


Explain ~/documents, ~/library, ~/tmp. What directory is ~ on ios?

1 Answers  


Explain how do I get a call when my ipad rings?

1 Answers  


Does ios support multitasking?

1 Answers  


How we can execute some code when app is in background?

1 Answers  


What is ipa?

1 Answers  


Categories