mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-27 12:17:38 +01:00
Converter: fix a memory leak when converting a single unit.
git-svn-id: trunk@39670 -
This commit is contained in:
parent
15f0c7aa65
commit
289e83d1dd
@ -866,8 +866,9 @@ var
|
|||||||
begin
|
begin
|
||||||
IDEMessagesWindow.Clear;
|
IDEMessagesWindow.Clear;
|
||||||
DelphiUnit := TDelphiUnit.Create(Self, fOrigFilename, []);
|
DelphiUnit := TDelphiUnit.Create(Self, fOrigFilename, []);
|
||||||
|
try
|
||||||
Result:=fSettings.RunForm(Nil);
|
Result:=fSettings.RunForm(Nil);
|
||||||
if Result=mrOK then
|
if Result=mrOK then begin
|
||||||
with DelphiUnit do
|
with DelphiUnit do
|
||||||
try
|
try
|
||||||
Result:=CopyAndLoadFile;
|
Result:=CopyAndLoadFile;
|
||||||
@ -893,7 +894,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
Result:=mrAbort;
|
Result:=mrAbort;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
ShowEndingMessage(Result);
|
ShowEndingMessage(Result);
|
||||||
|
finally
|
||||||
|
DelphiUnit.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TConvertDelphiProjPack }
|
{ TConvertDelphiProjPack }
|
||||||
@ -1311,7 +1316,6 @@ end;
|
|||||||
|
|
||||||
destructor TConvertDelphiProject.Destroy;
|
destructor TConvertDelphiProject.Destroy;
|
||||||
begin
|
begin
|
||||||
if Assigned(fMainUnitConverter) then
|
|
||||||
fMainUnitConverter.Free;
|
fMainUnitConverter.Free;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user