mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 01:10:01 +02:00
* Use new and dispose for asmmodeinfos
This commit is contained in:
parent
2cd92ee792
commit
328e60c155
@ -64,7 +64,7 @@ unit rabase;
|
|||||||
if assigned(asmmodeinfos[t]) then
|
if assigned(asmmodeinfos[t]) then
|
||||||
writeln('Warning: Asmmode is already registered!')
|
writeln('Warning: Asmmode is already registered!')
|
||||||
else
|
else
|
||||||
Getmem(asmmodeinfos[t],sizeof(tasmmodeinfo));
|
new(asmmodeinfos[t]);
|
||||||
asmmodeinfos[t]^:=r;
|
asmmodeinfos[t]^:=r;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ finalization
|
|||||||
for asmmode:=low(tasmmode) to high(tasmmode) do
|
for asmmode:=low(tasmmode) to high(tasmmode) do
|
||||||
if assigned(asmmodeinfos[asmmode]) then
|
if assigned(asmmodeinfos[asmmode]) then
|
||||||
begin
|
begin
|
||||||
freemem(asmmodeinfos[asmmode],sizeof(tasmmodeinfo));
|
dispose(asmmodeinfos[asmmode]);
|
||||||
asmmodeinfos[asmmode]:=nil;
|
asmmodeinfos[asmmode]:=nil;
|
||||||
end;
|
end;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user