Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Muss die Application wieder freigegeben werden? (https://www.delphipraxis.net/74180-muss-die-application-wieder-freigegeben-werden.html)

fwsp 29. Jul 2006 19:08


Muss die Application wieder freigegeben werden?
 
Hallo.

Ich hab Projekt, das nur starten soll, wenn einige Dateien da sind. Dazu hab ich ne boolsche Funktion gebastelt.
Ich frage mich jetzt ob ich die Application noch irgendwie abfangen muss? Sie wird ja immerhin initialisiert. Der Delphi Debugger meckert jedenfalls nicht rum, was ja nichts heißen muss...

Delphi-Quellcode:
begin
  Application.Initialize;
  Application.Title := 'Musik-Suite - strela-comp';

  if AllFilesExist then
  begin
    Application.CreateForm(TFMain, FMain);
    Application.CreateForm(TFSkalen, FSkalen);
    Application.CreateForm(TFKlavier, FKlavier);
    Application.CreateForm(TFIntervalle, FIntervalle);
    Application.CreateForm(TFOptions, FOptions);
    Application.CreateForm(TFAkkorde, FAkkorde);
    Application.CreateForm(TFrmQuiz, FrmQuiz);
    Application.CreateForm(TFAbout, FAbout);
    Application.CreateForm(TFBeispiele, FBeispiele);
    Application.CreateForm(TFrmInstrumente, FrmInstrumente);
    Application.CreateForm(TFTheremin, FTheremin);
    Application.CreateForm(TFReadTones, FReadTones);
    Application.Run;
  end;
end.

3_of_8 29. Jul 2006 19:16

Re: Muss die Application wieder freigegeben werden?
 
Initialize!=Create

Erzeugt wird das Application Objekt vermutlich im initialization-Abschnitt von Forms erzeugt (Application:=TApplication.Create) und im finalization-Abschnitt wieder freigegeben.

Du musst das also nicht machen.

fwsp 29. Jul 2006 19:25

Re: Muss die Application wieder freigegeben werden?
 
OK.


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz