The approaches to memory management vary widely across languages and platforms, not only at the level of visibility and control of the programmer, but also at implementation.
However, the basics of allocating and freeing memory are about the same when you go to the OS level. Of course, there are differences, tweaks and optimizations, but usually the programmer does not need to deal with such details.
Objective-C is an interesting hybrid, since version 2.0 of the language has been added to the garbage collection, but retains the ability to use reference counting (save / release / auto-advertisement). In fact, the same code can work in any mode, depending on the compilation flags and settings of other code loaded in the same process. This is not typical for programming languages - usually you get either managed (automatic) or uncontrolled (manual) based on the code you write, and sometimes the language / platform does not allow you to choose at all (for example, Java).
One taste is not necessarily better than another, and there is still religious debate about whether "real programmers [don't use] garbage collection" really, but don't worry too much about it. General knowledge of how different approaches to memory management never harm anyone, and, as a rule, it’s enough to understand the approach to the language (s) in which you are coding.
source share