我找不到在异常处理过程中在哪里创建异常类实例的信息?在哪个内存区域(栈、堆、静态存储等)?我假设它不在堆栈上,因为堆栈展开......
最佳答案
来自标准:
15.2.4: The memory for the temporary copy of the exception being thrown is allocated in an unspecified way, except as noted in 3.7.3.1.
3.7.3.1 说:
3.7.3.1: All objects which neither have dynamic storage duration nor are local have static storage duration. The storage for these objects shall last for the duration of the program (3.6.2, 3.6.3).
关于c++ - 在哪个内存区域创建异常类实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2252314/