pb halt以后,不会调用application的close事件的问题

本文探讨了PowerBuilder中Halt与Halt Close的区别。Halt会导致应用程序立即终止,可能引起对象未正常释放的问题;而Halt Close则会先执行application的Close事件脚本,确保资源得到正确清理后再终止程序。

发现pb程序halt以后没有调用,application的close事件,于是百度了一下发现

如果只使用halt,系统直接中止应用,可能会出现对象未正常释放的情况
而halt close会正常关闭主线程,这样的话application的close事件也会正常执行,所以halt应该尽量不用,推荐使用halt close
When PowerBuilder encounters Halt without the keyword CLOSE, it immediately terminates the application. 
When PowerBuilder encounters Halt with the keyword CLOSE, it immediately executes the script for the Close event for the application and then terminates the application. If there is no script for the Close event at the application level, PowerBuilder immediately terminates the application

 

转载于:https://www.cnblogs.com/szxiaofei14/p/6991917.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值