Can delegates be retained?



Can delegates be retained?..

Answer / Gaurav Khare

In Objective-C, delegates can be retained by setting their delegate property using `self` or by implementing the `retainDelegate` property on the delegate protocol. Retaining delegates helps prevent them from being deallocated before they have a chance to handle events.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

Does copy increase retain count?

1 Answers  


How does dispatch_once manages to run only once?

1 Answers  


Will objective c be deprecated?

1 Answers  


What is assign property in objective c?

1 Answers  


Can a static library (.a) contain resources like images, sound files etc?

1 Answers  


Is objective c and c the same?

1 Answers  


Is it possible to implement dealloc in arc?

1 Answers  


What are benefits of collections views?

1 Answers  


What is class extension?

1 Answers  


How to convert nsnumber to nsstring in objective c?

1 Answers  


What is nonatomic and strong in objective c?

1 Answers  


Is c and objective c the same?

1 Answers  


Categories