title: What's the difference between Struct based and Class based singletons?
body: <p>Are the two approaches the same or are there major differences/pitfalls to be aware of:</p>
  
  <pre><code>class MyClassSingleton {
    static let sharedInstance = MyClassSingleton()
    private init(){}
  
    func helloClass() { print("hello from class Singleton") }
  }
  
  struct MyStructSingleton {
    static let sharedInstance = MyStructSingleton()
    private init() {}
  
    func helloStruct() { print("hello from struct Singleton") }
  }
  </code></pre>