如果我在一组新的花括号中创建了一个变量,那么该变量是在右大括号上从堆栈中弹出的,还是会一直挂到函数的末尾?例如:
void foo() {
int c[100];
{
int d[200];
}
//code that takes a while
return;
}
在code that takes a while
部分期间,d
是否会占用内存?
https://stackoverflow.com/questions/2759371
复制相似问题