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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain some biggest changes in usernotifications.

518


Is singleton thread safe swift?

466


What is a static variable swift?

470


Is swift hard to learn?

480


Is equal to string swift?

472






What is set swift?

436


What is ios swift?

475


What is closure in swift?

482


What is swift nsarray?

460


What is the floating point numbers and what are the types of floating number in swift?

485


Why do we use swift?

481


Why swift is faster?

471


What language is swift most similar to?

447


What is swift stand for?

456


What is the use of break statement in swift language?

480