Advertisement
qdmitry

deinit thread

Dec 22nd, 2022
1,058
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.18 KB | Source Code | 0 0
  1. class Dummy {
  2.     let x = 0
  3.    
  4.     deinit {
  5.         print("deinit")
  6.     }
  7. }
  8.  
  9. var x: Dummy? = Dummy()
  10. print("dereferenced started")
  11. x = nil
  12. print("dereferenced finished")
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement