+ 3
So what's the point of caring about memory? Everything.
Every program/application you write will use memory in some way (call stack, variables functions etc). Computer systems only have a finite amount of memory, having a good understanding of how your program operates in memory is a core principal. It will allow you to build efficient programs, without wasting memory.
The introduction of memory holes/leaks into your programs can be a nightmare to track down and solve, it's better to think things through at the start trying to avoid such situations.
Sure the compilers can work out how many bits to allocate for an integer, float, function etc etc. However even declaring at the right time and scoping, so that the variable is destroyed when needed, is a form a memory management.
Also not every application knows at compile time what memory is needed, to get around this you can use methods (new/delete) to allocate and de-allocate memory at runtime.
"The memory works on everything when I'm programming" - That will be because your programs are simple/uncomplex and probably inefficient.
To give a simple example, I was working on a program written in Python (supposedly automatic memory management) where there was a lot of database interaction through an ODBC driver. The database it was interacting with was custom and pretty large, each query to this was increasing the memory usable be ~240mb each time (as you can guess after a short period of time it would exhaust resources and crash).
So yea, memory management if fundamental - if you ignore it you will have problems.
+ 2
Thatâs correct U14known.
In certain situations, you can avoid manual memory management (for example using the std::vector from the standard library, which is a container that handles the memory management for you).
However you need to understand that it is still very important, just because the memory management is being abstracted, itâs still happening and is fundamental.
This is only really scratching the surface, there are loads of great videos available for free on YouTube that are more in depth, visualizing how items are stored in memory.
Once you have a good understanding of memory, the more advanced topics/methods start to make sense.