Hello, I'm trying to delete a stringlist in my child class. I attached the screenshot of the error. Here's my code:
type
{ TMain }
TMain = class
protected
procedure DoRun;
public
constructor Create();
destructor Destroy;
procedure WriteHelp(Ver: shortstring); virtual;
...
type
TParameterHandler = class(TMain)
private
ListOfParameters : TStringList;
public
constructor Create();
destructor Destroy;
function CreateIndex(Directory: string): Boolean;
...
destructor TParameterHandler.Destroy;
begin // This line is giving me error
inherited Destroy;
ListOfParameters:=nil;
ListOfParameters.Free;
end;
How can I fix this error?