Autor Beitrag
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Sa 11.01.03 20:15 
Hallo Leute,

ich habe mir eine Klasse geschrieben:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
 TTestClass = class
  fHandle: Cardinal;
  public
   constructor Create;
   {...}
 end;


Wie ihr seht, kein Destructor, und da sie keinen Vorfahr hat, nun meine Frage: brauche ich einen Destructor, wenn ich ja gar nichts explizit freigeben kann? Oder braucht Delphi den, um den Speicher der Klasse freizugeben? Ich reserviere keinen Speicher, ich habe nur eine Variable (fHandle).

Wer ist Delphi-Experte und kann mir helfen?
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Sa 11.01.03 20:30 
Auch wenn du keinen Vorfahren angibst, wird die Klassen automatisch von TObject abgeleitet.

_________________
Ist Zeit wirklich Geld?
Andreas Pfau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Sa 11.01.03 21:45 
Danke für die schnelle Hilfe! :D