Autor Beitrag
soisseteben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: Mo 02.10.06 18:57 
hi,
Muss ich Komponenten, die ich zur Laufzeit erzeugt hab, wieder explizit freigeben, oder erledigt das Delphi bei Programmende für mich?

Danke schonmal
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 02.10.06 19:00 
Wenn du ihnen einen Owner übergeben hast, erledigt der das für dich.

_________________
Markus Kinzler.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 02.10.06 19:01 
Moin!

Grundsätzlich: ja! :mahn:

Ausnahme: Wenn du Controls anlegst, kannst du das ja mit Übergabe eines Eigentümers tun, z.B.:
ausblenden Delphi-Quelltext
1:
MyEdit := TEdit.Create(Form1);					

In diesem Fall ist Form1 der Eigentümer, der alle untergeordneten Objekte mit freigibt, wenn er selbst freigegeben wird.

Ansonsten entsorgt Windows natürlich bei Prozessende üblicherweise den Speicher, den dein Programm angefordert hat; aber das ist natürlich nicht wirklich die Antwort auf deine Frage. ;)

cu
Narses

//EDIT: unglaublich, du bist aber heute echt mein "Vorgesetzter", user profile iconmkinzler... :rofl:

_________________
There are 10 types of people - those who understand binary and those who don´t.
soisseteben Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: Mo 02.10.06 19:31 
Okay, danke :D