delphi - EOutOfMemory异常可以恢复吗?

标签 delphi exception out-of-memory

捕获 EOutOfMemory 异常后继续执行是否有意义,或者现在堆或堆栈很可能已损坏?

我并不是指由于写入野生地址等错误而导致之前的内存损坏而导致的 EOutOfMemory 情况,我的意思是调用 GetMem 并捕获的正确代码EOutOfMemory

最佳答案

在我看来,尝试从 EOutOfMemory 继续下去是没有意义的。根据我的经验,堆被损坏的可能性非常高,并且 future 可能会出现错误。通常,最安全的做法是终止该进程。

关于delphi - EOutOfMemory异常可以恢复吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14975346/

相关文章:

android - Android 7.x 上的 Samsung Galaxy 设备出现大量 OutOfMemoryError

delphi - 在Cbuilder中使用Delphi组件链接错误

将字节数组转换为 double 时出现 java.nio.BufferUnderflowException

android - 将 Android 应用程序(在 Delphi FireMonkey 中开发)部署到 Google Play 商店

ruby-on-rails-3 - 引发异常时 Rails 渲染 html 而不是 json

java - 为什么 UmbrellaException 有那个名字?

python - 克服 Ashton String 任务中的 MemoryError/Slow Runtime

String.replace 上的 java.lang.OutOfMemoryError

delphi - Delphi中识别计算机的子网掩码

delphi - Win32 和 Win64 中 exAllArithmeticExceptions 的结果不一致