Suppose there is some function that runs every 0.5 seconds:
procedure func(); var list: TStringList; str: string; begin list := TStringList.Create(); str := 'STRING'; ... end;
The question is: will local variables be automatically deleted from memory when the function is processed? And is there a mechanism similar to the Garbage Collector (Java, C #) in Delphi?