delphi xe memory leak produced in WSDLLookup.pas

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;

 

你可能感兴趣的:(memory leak)