You've already forked lazarus-ccr
fpspreadsheet: Fix memory leak (ignored format string and dyn formula array when freeing cells)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2941 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -557,9 +557,11 @@ end;
|
||||
}
|
||||
procedure TsWorksheet.RemoveCallback(data, arg: pointer);
|
||||
begin
|
||||
{ The UTF8STring must be manually reseted to nil content, because
|
||||
{ The strings and dyn arrays must be reset to nil content manually, because
|
||||
FreeMem only frees the record mem, without checking its content }
|
||||
PCell(data).UTF8StringValue:='';
|
||||
PCell(data).UTF8StringValue := '';
|
||||
PCell(data).NumberFormatStr := '';
|
||||
SetLength(PCell(data).RPNFormulaValue, 0);
|
||||
FreeMem(data);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user