I have many units with "finalization" sections in my Delphi 7 projects.
How do I make sure to execute some code last?
I tried to write a "finalization" section in the .dpr file but it does not compile.
I have many units with "finalization" sections in my Delphi 7 projects.
How do I make sure to execute some code last?
I tried to write a "finalization" section in the .dpr file but it does not compile.
There's a good explanation on the finalization ordering for code in Unit finalization order for application compiled with run-time packages - the questioner came up with a reasonable way to ensure that his ordering worked - add the module at the start of the uses clause of the project, and ensure that the module in question does not use any other units.
Edit: Took David Heffernan's addendum on-board.