Back to Browse

Garbage Collection And Automatic Reference Counting Explained

21.3K views
Oct 19, 2017
2:42

When you create an object, and you assign it to some variable, it’s termination isn’t tied up to the lifetime of a given variable. This means that with the destruction of the variable, only a reference to the object is destroyed, but the object itself is still allocated in the memory. If there are too many objects in the memory, the program will eventually run out of resources and won’t be able to perform further operations. Thanks to the techniques such as Garbage Collection or Automatic Reference Counting, we don’t need to do that anymore. Here’s how they work. Please Like and Subscribe for more weekly videos! Follow me on Twitter: https://twitter.com/thecompscirocks Follow me on Instagram: https://www.instagram.com/thecompscirocks/ Follow me on Facebook: https://www.facebook.com/thecompscirocks/ Some sources & further reading: https://en.wikipedia.org/wiki/Object_lifetime https://en.wikipedia.org/wiki/Reference_(computer_science) https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) https://en.wikipedia.org/wiki/Automatic_Reference_Counting http://www.thomashanning.com/retain-cycles-weak-unowned-swift/ https://en.wikipedia.org/wiki/Memory_leak https://www.dynatrace.com/resources/ebooks/javabook/how-garbage-collection-works/ https://developer.apple.com/library/content/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html

Download

1 formats

Video Formats

360pmp43.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Garbage Collection And Automatic Reference Counting Explained | NatokHD