>>12081268>What exactly is so difficult about memory management?Nothing.
The reason that memory management is such a hot topic is not that it's hard. It isn't. It's as easy to get right as almost anything else in your program. If you are a vaguely competent programmer, you make about as many errors in manual memory management as you make everywhere else in your code.
But in the languages in which manual memory management plays a significant role (C and C++), if you fuck up your memory management, it's easy to fuck up your program far beyond what is possible with most other bugs. Memory management errors lead to you overwriting random pieces of memory, which can cause completely unpredictable problems later on which are very hard to debug. Worse, overwriting random pieces of memory is by far the most prominent way of creating security bugs that allow for arbitrary code execution attacks, which is one of the most dangerous classes of exploits.
Languages without manual memory management avoid the above two classes of problems almost entirely. Conversely, if you program in a language in which memory is mostly managed manually, then of every twenty bugs you make, one of them will statistically be a subtle memory management bug (you don't make memory management bugs any more or less often than other types of bugs), which with realistic bug rates means your program will inevitably be a exploitable insecure crapshoot. Unless you are absolutely cracking, which you're not.
tl;dr: Manual memory management isn't hard. But ERRORS in manual memory management are much worse than most other errors, so avoiding the whole necessity is an excellent way to improve your software.