Do I need to delete arrays explicitly in C++ for memory conservation?
You don't have to delete this array since you create it on stack. If you created the array using new then you would have to use delete to clean up.
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
.