如果我在一组新的花括号中创建一个变量,那个变量是从结束括号上的堆栈中弹出的,还是会挂起直到函数结束?例如:
void foo() { int c[100]; { int d[200]; } //code that takes a while return; }
会不会d是在占用内存code that takes a while部分?
d
code that takes a while
c memory stack
c ×1
memory ×1
stack ×1