What is the difference between copies & retain in iOS operating system?



What is the difference between copies & retain in iOS operating system?..

Answer / Satyendra Singh

In Objective-C, 'retain' increases the reference count of an object by 1 (meaning that the object is not deallocated as long as the reference count is greater than zero). On the other hand, 'copy' creates a new instance of the object and transfers ownership to the caller. Retain just retains the existing object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

Please explain what is difference strong and weak reference?

1 Answers  


Will iphone 6 get ios 13?

1 Answers  


Difference between coredata & sqlite?

1 Answers  


How to parse xml?

1 Answers  


How to install an iphone application for testing?

1 Answers  


How can a user respond or react to the state transitions on the app?

1 Answers  


Explain How to access document directory

1 Answers  


What performance issues can you face when using coredata?

1 Answers  


What compilers apple using ?

1 Answers  


What is a struct?

1 Answers  


Explain the correct way to manage Outlets memory in iOS.

1 Answers   UGC Corporation,


How do I get ios 13?

1 Answers  


Categories