|
|
Fredrik Eriksson wrote:
>
> No. Indeed, you must not, as it is not dynamically allocated.
>
>> Is the memory used by that array freed after the program is terminated?
>
> It is freed when 'i' goes out of scope. If 'i' is in namespace scope, it
> goes out of scope when the program ends.
Thank you. My program should not have any memory leaks, then. I assume
this also applies to other variables as well?
Sam
Post a reply to this message
|
|