title: How are static variables stored in memory in Swift?
body: <p>How are static variables in Swift stored? </p>
  
  <ol>
  <li><p>What happens if I never call the func useStaticVar() ? Are these variables initialised or not?</p></li>
  <li><p>What happens if I do call useStaticVar() and then never access them again? Ar</p>
  
  <pre><code>struct Something {
      static var myVariable = 0
      static let myConstant = 3
      static var myString: String?
  
      static func useStaticVar() {
          myVariable = myConstant
          myString = String(myVariable)
      }
  }
  </code></pre></li>
  </ol>