Automatic reference counting | What is swift ARC | Memory management in swift

Описание к видео Automatic reference counting | What is swift ARC | Memory management in swift

ARC in swift or automatic reference counting in swift is a key topic in swift memory management, In this swift tutorial, we learn how we programmers end up creating a strong reference cycle in the application and how we can break it using weak reference in swift.

Swift uses ARC technique to manage the memory but sometimes it’s also how we write our code that dictates if swift ARC will keep the object in memory or will remove it.

What is ARC in swift, OR a common interview question that’s always being asked so I hope with this video we learn better to answer this question?

In this swift tutorial on ARC and memory management, I will explain how we can write code to avoid a strong reference cycle which will help us to clean up unwanted objects from the memory immediately if they are not being used anymore.

Using the deinit keyword in swift we can keep track if the object was released or ended up in a strong reference cycle, in many case I just use the weak keyword in swift to avoid strong reference cycles because it’s easier that way.

Let me know if you have used deinit in some scenarios it will be interesting to hear your use case.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥

🔗Click on the link to subscribe: https://www.youtube.com/c/codecat?sub...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

🎶 Royalty free Music: https://www.bensound.com
-----------------------------------------------------------------------------------------------------------------------

📥 Download the code from the given link

Google drive link: https://drive.google.com/open?id=1z8B...

Github link: https://github.com/codecat15/Youtube-...

-----------------------------------------------------------------------------------------------------------------------

############################################

Connect with me on social media

📧: [email protected]
#️⃣:   / codecat15  
Facebook:   / code.cat.792  
Github: https://github.com/codecat15

###########################################

#swiftDev #swiftiOS #arcInSwift

Комментарии

Информация по комментариям в разработке