Hello,
What is good way of passing class to another class? Who should create
and destroy class?
type TJob = class
ID: integer;
Name: string;
StoredProcName: string;
ThreadsAllowed: integer;
OnStartup: boolean;
OnClose: boolean;
OnUserInteract: boolean;
CCC_Interface_Apply:TCCC_Interface;
constructor Create;
destructor Destroy; override;
end;
type TAJob = class
Items: array of TJob;
function Add(job:TJob): integer;
constructor Create;
destructor Destroy; override;
end;
function TAJob.Add(job: TJob): integer;
begin
setlength(Items,length(items)+1);
items[length(Items)-1]:= job; // this is not look correct
end;