Swift uses Automatic Reference Counting (ARC) to manage the memory of instances of classes. ARC automatically keeps track of references to class instances and deallocates them when they are no longer needed, freeing up memory. Retail Cycle and Memory Leak A retain cycle occurs when two or more class instances …