Introduction To Swift Memory Layout

In the previous article, we discussed some features of Swifts Value Type semantics. Today, we are going to take a look at the fundamentals of how different Swift types are allocated and what that means for our apps performance.

Reference Type Objects

A simple class is a Reference Type, just like mentioned in the last article. This comes with a few features that most of us learn about pretty early. For example, a single class object can be referenced and manipulated by several variables. But what happens when we create an…