I'm not sure why I'm coming back to the basics repeatedly.
When I'd like to clear objects within objects, should I use destructor or procedure Free?
Example is:
type
TMyObj = class
AStringList: TStringList;
constructor Create;
procedure Free; // 1. Should I declare destructor or procedure?
// 2. If I declare procedure, should I declare 'overide' to free?
end;
....
implementation
procedure TMyObj.Free;
begin
AStringList.Free;
inherited Destroy; // 3. Should I declare Destoy here?
end;
I know that any Object can be 'free'd without declaration as it is declared as TObject.Free. What is the best if I want to do something before destruction? My three questions are within the example code.