Do I need to delete arrays explicitly in C++ for memory conservation?
c++, garbage-collection
Solution
There is no Garbage Collection in C++.
However, if you use automatic variables, they will be destroyed when they fall out of scope.
As a rule, there should be 1 `delete` call for every `new`. If you have no `new`, you don't `delete`.
Problem
In one function. I create a local arrray. `char arr[20];` And before end of this function. Will compiler do garbage collection for me? Or I need to do `delete` by myself?