Swift 5.8 Is For Early Adopters

Tom Smykowski
3 min readNov 2, 2022

Swift 5.8 is the minor release of a programming language that was initially used mostly for native iOS apps. Let’s see what’s new!

Relaxed explicit self rules

Swift is a language that relies on a memory management method called an Automatic Reference Counting (ARC).

It is one of the three main methods of handling memory. Two others are:

managing memory manually

It is a method used in C language, where you allocate and deallocate memory for variables on your own.

garbage collection

Garbage collection is an automatic method of releasing memory after objects that are not longer used. It works by going through a tree of objects to find all that are still in use. Than, the rest of objects is considered not used, and are released. The method is exercised by apps written for example in C# or Javascript.

automatic reference counting

Automatic Reference Counting is somewhere in the middle between releasing memory manually and garbage collection.

It works by keeping track of the number of references to an object. If the number becomes zero, object is not used, so the memory can be released.

what is the problem with ARC?

If an object A references object B, and object B references object A, a garbage collector will be able to release them (of course if nothing else…

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

Software Engineer & Tech Editor. Top 2% on StackOverflow, 3mil views on Quora. Won Shattered Pixel Dungeon.

Responses (1)