Memory allocation in swift

29 Views Asked by At

In swift, based on Apple's documentation reference types are stored on heap and value types on stack, but if a class definition has a struct variable for example String, where will that be stored?

class ABC {
  var str: String
  init() {
    self.str = ""
  }
}

Where will be str stored?

0

There are 0 best solutions below