![]() |
Meinen IQ - wirklich :?:
Du hast doch jetzt bereits selbst geschrieben, dass Deine Methode z.b. 2 mal 1000 Bytes reserviert. Wir benötigen das Form aber nur einmal, also hast Du doch 1000 Bytes mehr als nötigt verbraten, oder :?: Andere Annahme. Das initialisieren des Forms benötigt z.B. 5 Sekunden. So wird es doch, wenn ich es zwei mal initialisiere, dann daurt das schon 10 Sekunden... |
Also drehte sich das ganze Mistverständnis wirklich nur darum,
dass Du nur eine Instanz erzeugen willst ?!? Also kein z.B.: Tprogconfig.Show im MainForm aufrufen mußt. Klar Sakura, dann ist jede mit Create erzeugte Instanz Verschwendung - aber auch jede mit CreateForm erzeugte. Wo ist der (Speicher)-Unterschied zwischen: 1. Sven, genannt: Swittipei :lol: begin ... progconfig := Tprogconfig.Create ( Application ); comconfig := Tcomconfig.Create ( Application ); Application.CreateForm ( TForm1, Form1 ); ... end. 2. Sakura, genannt: the brain :wink: begin ... Application.CreateForm ( TForm1, Form1 ); Application.CreateForm ( Tprogconfig, progconfig ); Application.CreateForm ( Tcomconfig, comconfig ); ... end. Für mich bedeutet obiges in beiden Versionen: 3 gesetzte ( oder initialisierte ) Pointer, 3 erzeugte Instanzen und Applikation.MainForm^ = Form1^ Der einzige Unterschied meiner Version: Ich kann von Form1 auf die Innereien von progconfig und comconfig zugreifen ( was aber nur die erste Zeile Ausgangsproblems löst, ich hatte es nicht ganz gelesen ) Ich hoffe wir haben es nu. Gruß Sven |
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:18 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz