What is de-initializer and how it is written in Swift?



What is de-initializer and how it is written in Swift?..

Answer / iosraj

A de-initializer is declared immediately before a class instance is de-allocated. You write de-initializer with the deinit keyword. De-initializer is written without any parenthesis, and it does not take any parameters. It is written as

deinit {

// perform the deinitialization

}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

Is swift easier than java?

0 Answers  


What is Initialization ?

1 Answers  


What is a type in swift?

0 Answers  


What is dynamic in swift?

0 Answers  


What are the higher order functions in swift?

0 Answers  






What is framework in swift?

0 Answers  


What is the use of static keyword in swift?

0 Answers  


What is string in swift?

0 Answers  


Explain enum?

0 Answers  


How should errors be handled in swift?

0 Answers  


Is swift an object-oriented programming language?

0 Answers  


Does apple use swift internally?

0 Answers  


Categories