Introduction To Swift Memory Layout

Jimmy M Andersson
5 min readDec 3, 2018

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…

--

--

Jimmy M Andersson

Software engineer with a passion for data and machine learning