I would like to terminate a Delphi application without executing any other code line and I\'m wondering about which is the proper way to do this. Furthermore, I would like to kn
I would like to terminate a Delphi application without executing any other code.
Neither Application.Terminate
nor Halt
will achieve that. The former performs an orderly termination. Lots of code will execute. Calling Halt
is more hopeful. That is an abnormal termination. But unit finalization code is executed.
If you wish to exit as quickly as possible, executing the minimum amount of code along the way, call ExitProcess. That's the final step of Halt
and by calling ExitProcess
directly you avoid all the steps that Halt
takes before it calls ExitProcess
.