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
What are type methods in swift?
What is hashable in swift?
Can any be nil swift?
Explain some common execution states in ios?
What is the use of break statement in swift language?
Can enum conform to swift protocol?
What is better swift or objective c?
Why is inheritance not desirable in swift?
Does swift have a runtime?
What is the full form of swift code?
What is nested function in swift?
Can you explain completion handler?
Is equal to string swift?
How many types of closures are there in swift?
What is the difference between swift and xcode?