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

Can you explain completion handler?

0 Answers  


Explain what is half-open range operator?

0 Answers  


What is difference between if and guard in swift?

0 Answers  


Is swift difficult to learn?

0 Answers  


What are the control transfer statements in swift?

0 Answers  






What is forced unwrapping? Why is it potentially unsafe?

0 Answers  


Mention what is the Floating point numbers and what are the types of floating number in Swift?

1 Answers  


Is swift a good language to learn?

0 Answers  


What is retain in swift?

0 Answers  


How will you connect ui?

0 Answers  


What is a string swift?

0 Answers  


Is c++ similar to swift?

0 Answers  


Categories