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 |
What is the full form of swift code?
What is nil-coalescing operator?
What is hashable in swift?
What is a deinitializer in swift?
Who created swift?
What is a guard statement?
What is the benefit of using guard statement in swift?
What is difference between single and double, in swift?
What are the higher order functions in swift?
How can you declare a variable in swift?
What is the use of double question mark “??” In swift?
What do you mean by a deinitializer?