What is “defer”?



What is “defer”?..

Answer / Naushad Ahamed Siddique

"defer is a Swift keyword used to defer the execution of a piece of code until the end of the current scope. It's particularly useful for ensuring that resources are properly released when they are no longer needed."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

Can enum be extended in swift?

1 Answers  


How does closure work in swift?

1 Answers  


What is dependency injection in swift?

1 Answers  


Who calls the main function of our app during the app launch cycle?

1 Answers  


What is singleton in swift?

1 Answers  


How can you write a multiple line comment swift?

1 Answers  


What is the use of break statement in swift language?

1 Answers  


What are the control transfer statements in swift?

1 Answers  


List some control transfer statements used in swift?

1 Answers  


What is nested function in swift?

1 Answers  


What is lazy var in swift?

1 Answers  


What is a protocol in swift?

1 Answers  


Categories