Classes vs. Structs in Swift — Basics and Memory Management
Value types vs. reference types, stack vs. heap allocation, and more
Published in
7 min readMar 25, 2021
I’ve been asked this question many times during interviews: “What is a class and what is a struct? Mention a few differences and when you would use them.”