Atomically Reference Counted



Atomically reference counted, or ARC for short, is a way of managing memory in computer programs.
Imagine you have a toy that you share with your friend. You both want to play with the toy, but you can't play with it at the same time. So you come up with a system: when you want to play with the toy, you hold it and say "I'm playing with the toy now". When you're done playing with the toy, you give it to your friend and say "You can play with the toy now". Your friend can do the same thing when they're done playing with the toy.
ARC works in a similar way. Imagine you have a piece of memory in your computer program that you share with another part of the program. You both want to use the memory, but you can't use it at the same time. So you come up with a system: when you want to use the memory, you "borrow" it and say "I'm using the memory now". The memory is marked as "in use" by you. When you're done using the memory, you "return" it and say "You can use the memory now". The memory is marked as "not in use" and can be used by the other part of the program.
ARC is a way of keeping track of how many parts of the program are using the memory at any given time. If only one part of the program is using the memory, then that part has "ownership" of the memory and can do whatever it wants with it. If multiple parts of the program are using the memory, then ARC makes sure that they don't interfere with each other and that the memory is only freed when all parts are done using it.
In summary, ARC is a way of managing memory in computer programs by keeping track of how many parts of the program are using the memory at any given time, similar to how you and your friend share a toy by taking turns using it.