type Tmyclass = class(TObject)
somearray: array of TSometype
FBool: Boolean;
Fint: Integer;
Fstr: string;
constructor Create;
destructor Destroy; override;
end;
implementation
constructor Tmyclass.Create;
begin
inherited;
SetLength(somearray,0); //is this needed?
end;
destructor TmyClass.Destroy;
begin
SetLength(somearray,0); //this IS needed!
inherited;
end;
Also what types are initialized on creation? For example what I declared in the class. is FBool guranteed to be false? is FInt guranteed to be 0? is Fstr guranteed to be ''?
What about local? Only strings?
I use Delphi XE.