Autor Beitrag
killavirus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49

Win 2000
D5 Prof, D7 Prof
BeitragVerfasst: Di 21.06.05 13:54 
Hallo,

Ich hab ein Problem bei der Freigabe von Array of Object ...

ausblenden Delphi-Quelltext
1:
2:
Bereitschaft: Array of TTabSheet;
I_Bereitschaft: Array of Array[0..1] of TImage;


Ich erzeuge mehrere dynamische TabSheets, Pagecontrols und Images ...

Leider habe ich das Problem das bei der Freigabe dieser mir eine EaccessViolation auftritt.

Folgenden Versionen der Freigabe habe ich probier und bekomme immer die Fehlermeldung

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
FreeAndNil(Bereitschaft);

for x:=0 to Length(Bereitschaft) do begin
   Bereitschaft[x].Free;
end;


Leider ist es bei mir im Büro *popo* Heiss und finde den Fehler nicht :D
Danke für eure Hilfe ...

Gruß Maik

_________________
I need a girl whose name doesn't end in .JPG
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Di 21.06.05 19:39 
Hallo

Wo und wann (z.B. beim Beenden) genau erhälst du den Fehler und wie sieht das Erstellen aus?
außerdem beginnen dyn. Array bei 0 an zu zählen und das letzte Element ist lenght(array)-1 ;)

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
killavirus Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49

Win 2000
D5 Prof, D7 Prof
BeitragVerfasst: Mi 22.06.05 09:44 
Hallo,

Sorry Hab den Fehler gefunden...
Lag daran das in dem ersten Eintrag im Array nichts drin stand.

Danke für eure Hilfe

Maik

_________________
I need a girl whose name doesn't end in .JPG