-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Swift 5.3
By :

For many years, the primary languages that I used were C and C-based object-oriented languages. These languages required a good handle on managing memory and knowing when to release memory. Luckily, modern languages like Swift take care of managing memory for us. However, it is a good idea to understand how this memory management works so we can avoid the pitfalls that cause this memory management to fail.
In this chapter, we will learn:
As we saw in Chapter 17, Custom Value Types, structures are value types and classes are reference types. What this means is that when we pass an instance of a structure within our application, such as a parameter of a method, we create a new instance of the structure in the memory. This new instance of the structure is only valid while the application is in the scope where...