Autor Beitrag
rafi@work
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 147

Win2000 Prof
D7 Enterprise
BeitragVerfasst: Mo 22.12.03 14:55 
Hallo zusammen!

Beim Start von einem Form wird das Form ja automatisch kreirt. Wenn ein Form kreirt wird, wird auch automatisch virtuellen Speicher belegt. Nun möchte ich dass beim Schliessen von diesem Form der belegte virtuelle Speicher wieder freigegeben wird. Mit der Methode Release kann man ja das Formular aus dem Speicher entfernen. Wo müsste ich diese Methode aufrufen?

Gruss rafi@work
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 22.12.03 14:59 
Ich dachte immer wenn du es mit "Close" schliest wird das automatisch gemacht...

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 22.12.03 15:54 
Chatfix hat folgendes geschrieben:
Ich dachte immer wenn du es mit "Close" schliest wird das automatisch gemacht...

Nein, denn dann könntest du es mit Show nicht erneut aufrufen.
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Mo 22.12.03 16:14 
hallo,

zu der eigentlichen frage. Das kannst du im OnClose event machen.

Gruß
KEn

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Mo 22.12.03 16:24 
Hi,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;


MFG

- Ernesto -


// Edit: allerdings musst du dann, wenn du's erneut anzeigen möchtest wieder erstellen:
ausblenden Delphi-Quelltext
1:
2:
Form1 := TForm1.Create(nil);
Form1.Show;
rafi@work Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 147

Win2000 Prof
D7 Enterprise
BeitragVerfasst: Mo 22.12.03 16:42 
Super, Danke ErnestoChe!! V-Speicher wird wie gewünscht freigegeben.

gruss