Initialize and Finalize
The Initialize
procedure will be execute before any other events and can be used to initialize global variables.
Th Finalize
procedure will called after the project is done and must be used to clear eventual gloabl objects created in the Initialize
procedure
Example
var
gDeler: TSearchTable; // Declare a gobale variable
procedure Initialize;
begin
// The global variable has to created and initialized in the Initiliaze procedure
gDeler := TSearchTable.Create('ALU_DELER'); // Create and load search table "ALU_DELER"
end;
procedure Finalize;
begin
gDeler.Free; // The global variable has to be freed
end;
Last updated
Was this helpful?