Swift: How ARC works?

Whenever we create a new class instance, ARC allocates a chunk of memory to store information about that Class instance. The information stored includes the type of the instance and stored properties associated with that instance. When the instance is no longer needed, ARC frees up the memory so that it can be used for other purposes. ARC keeps track of all the variables, constants and properties which refer to that particular class instance. ARC will not deallocate an instance as long as any one active reference to that instance exists.

Leave a Reply