Not.
Variables declared on the stack do not need to be manually freed. Your array is within the while . For each iteration of the loop, the array is allocated on the stack and then automatically freed.
Only an array declared with new[] should be manually freed with delete[]
Also, the declared array is not static in any sense. The static has a specific meaning in C. The declared array is actually stored as the variable auto (automatic storage), which means that it is automatically freed when it goes out of scope.
Charles Salvia
source share