'Is it dangerous to use C++ without knowing memory management? [closed]

Is it dangerous to use C++ without knowing memory management?

Is it necessary to know memory management while developing programs in C++ normally? Can we damage computer memory if we don't know it? Or does the program we write inflate/overloading in memory?



Solution 1:[1]

Is it dangerous to use C++ without knowing memory management?

Depends on what you consider "dangerous" and, how willing you are to learn and other factors.

If you attempt to write a program without understanding the language, and without attempting to learn it, then the outcome is likely a program that doesn't work, or one that appears to work but breaks when a seemingly unrelated condition changes.

Is it necessary to know memory management while developing programs in C++ normally?

It depends.

It's (possibly surprisingly) easy to write even complex programs while avoiding any manual memory management. However, at minimum you must still understand the lifetime of objects which may be considered a basic part of memory management.

Furthermore, if you were to be tasked with developing programs that do involve memory management, then you wouldn't be able to understand it without understanding memory management.

Can we damage computer memory if we don't know it?

No, not in most cases. Unless you are writing a program that controls a robot arm that can reach and damage its own circuits.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 eerorika