mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:29:33 +02:00
Avoid memory leak for InstrWriter field in powerpc TAssembler descendants
git-svn-id: trunk@34402 -
This commit is contained in:
parent
7eea450a52
commit
c327a07414
@ -401,6 +401,8 @@ unit agppcgas;
|
|||||||
constructor TPPCGNUAssembler.create(info: pasminfo; smart: boolean);
|
constructor TPPCGNUAssembler.create(info: pasminfo; smart: boolean);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
if assigned(InstrWriter) then
|
||||||
|
InstrWriter.free;
|
||||||
InstrWriter := TPPCInstrWriter.create(self);
|
InstrWriter := TPPCInstrWriter.create(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -441,6 +443,8 @@ unit agppcgas;
|
|||||||
constructor TPPCAppleGNUAssembler.create(info: pasminfo; smart: boolean);
|
constructor TPPCAppleGNUAssembler.create(info: pasminfo; smart: boolean);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
if assigned(InstrWriter) then
|
||||||
|
InstrWriter.free;
|
||||||
InstrWriter := TPPCInstrWriter.create(self);
|
InstrWriter := TPPCInstrWriter.create(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user