DelphiFAQ Home Search:
General :: Programming :: Delphi :: VCL
About the Delphi VCL (Visual Component Library)


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Application.Terminate or Halt() ?

Should I use Application.Terminate or Halt() ?
And what are the differences?

Application.Terminate closes the main window and that way the application
in a clean fashion. Halt() shuts down right away, e.g. memory may not be
freed, tables are not closed and so on.

For D4: Halt can cause AV's on an NT system, usually with Runtime error 216,
if DLL's are involved also 217 - Application.Terminate on the other hand
cleans without AV.
But: Halt worked with D2, even the cleaning of the memory did work....

Then again, if you write a console application, you have to use halt(),
since there probably is no Application object.

Generated 8:01:13 on Feb 28, 2020