码迷,mamicode.com
首页 > Windows程序 > 详细

delphi xe memory leak produced in WSDLLookup.pas

时间:2015-06-08 19:00:04      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

constructor TWSDLLookup.Create;
begin
  FLookup := TDictionary<string, Variant>.Create;
end;

destructor TWSDLLookup.Destroy;
begin
  ClearWSDLLookup;  //问题在这里
  inherited;
end;

改为:

constructor TWSDLLookup.Create;
begin
  FLookup := TDictionary<string, Variant>.Create;
end;

destructor TWSDLLookup.Destroy;
begin
  ClearWSDLLookup;
  FLookup.Free;  //加上这个
  inherited;
end;

 

delphi xe memory leak produced in WSDLLookup.pas

标签:

原文地址:http://www.cnblogs.com/starluck/p/4561561.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!