Delphi:一个表单可以自由释放吗? [英] Delphi: Is it ok for a form to free it self?
本文介绍了Delphi:一个表单可以自由释放吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
此外,使用表单,您可以调用释放。
它向表单发送一个CM_RELEASE消息。作为一个反应,它称为免费。
发布的优点是没有任何消息可以导致崩溃。
I have a form that I use to show some information for some seconds. Is it ok for the form to free itself? Can I start a timer in the constructor, and then call self.free in the timer-event? Or will this potentially lead to trouble?
解决方案
In addition, with a form you can call release.
It sends a CM_RELEASE message to the form. As a reaction it calls Free. The advantage of release is that there are no messages left for the form which could result in a crash.
这篇关于Delphi:一个表单可以自由释放吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文