如果您尝试释放未使用的内存,会发生什么malloc/calloc?
这就是我的意思:
void main()
{
int temp = 0;
int *ptr = &temp;
free(ptr);
}
Run Code Online (Sandbox Code Playgroud)
我以为free()会返回一些错误代码,但free()没有返回值.
| 归档时间: |
|
| 查看次数: |
210 次 |
| 最近记录: |