procedure blabla; var t:TStrings; begin try t:= test; memo1.lines.addStrings(t); finally t.free; end; end;