What is the difference between weak and strong?



What is the difference between weak and strong?..

Answer / Chhaya Singh

In Objective-C, `strong` refers to a strong reference that prevents an object from being deallocated until all strong references are removed. On the other hand, `weak` creates a reference that does not prevent an object from being deallocated when there are no other strong references to it. Weak references are useful for avoiding retain cycles.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

Can you please explain the difference between nsarray and nsmutablearray?

1 Answers  


What is strong and weak in ios?

1 Answers  


What is the meaning of 'synthesize' keyword?

1 Answers  


Explain me what is "delegate"?

1 Answers  


Why do we override drawrect: method?

1 Answers  


Explain how to delete images in ios?

1 Answers  


Major difference between delegate and notification?

1 Answers  


What framework is used to construct application's ios user interface?

1 Answers  


What is datasource in ios swift?

1 Answers  


An app is loaded into memory but is not executing any code. In which state will it be in?

1 Answers  


Is core data is thread safe?

1 Answers  


What is meaning of 'synthesize' keyword ?

1 Answers  


Categories