Here I provide simple piece of code.
function GetStringList:TStringList; var i:integer; begin Result:=TStringList.Create; Result.Add(\'Adam\'); Res
I don't know what you mean by safe, but it is common practice. The caller of the function becomes responsible for freeing the returned object:
var s : TStringList; begin s := GetStringList; // stuff s.free; end;