Here I provide simple piece of code.
function GetStringList:TStringList; var i:integer; begin Result:=TStringList.Create; Result.Add(\'Adam\'); Res
In btn1Click you should do:
var sl2: TStringList; sl2 := GetStringList: SL.Assign(sl2); sl2.Free;
In btn2Click you don't have to create an instance of SL before calling ProvideStringList to not create a memory leak.