遇到了一个奇葩的问题,Delphi的string类型会泄露,网上找了一下,是因为fillchar清空后引用计数没有减造成的。
网上有种解决办法:
procedure IniFillChar(out r;c:integer);
begin
fillchar(r,c,#0);
end;
可以解决,亲测可行。
原文参考:http://www.360doc.com/content/11/0801/09/68419_137087408.shtml
遇到了一个奇葩的问题,Delphi的string类型会泄露,网上找了一下,是因为fillchar清空后引用计数没有减造成的。
网上有种解决办法:
procedure IniFillChar(out r;c:integer);
begin
fillchar(r,c,#0);
end;
可以解决,亲测可行。
原文参考:http://www.360doc.com/content/11/0801/09/68419_137087408.shtml