In swift array is value type so in below code its copying the values. finally how many elements stored in memory and explain why?

前端 未结 0 553
天涯浪人
天涯浪人 2020-12-14 19:22
let firstArray = Array(0...100000)
let secondArray = firstArray;

If 2m elements stored in memory then what is the use of struct, we can choose class

相关标签:
回答
  • 消灭零回复
提交回复
热议问题