The funniest thing is people would always bring up Java as a solution for memory leaks, but today, memory leaks are more of a problem with Java code than C++ code. It's treated as just completely normal that you should restart long-running Java services on a schedule (same cope gets applied to python) because that ecosystem is so poojeet that it would be a surprise if it didn't leak.
The big turning point for the C/C++ world was valgrind. We had Rational Purify before that but it was only in use at the corporate level, valgrind made it even easier and free. A lot of Linux ports were motivated by the desire to test with valgrind, some of those ports were internal-only.