delphi xe memory leak produced in WSDLLookup.pas
1654 단어 memory leak
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;