* Use new and dispose for asmmodeinfos

This commit is contained in:
Michaël Van Canneyt 2025-03-18 15:44:17 +01:00
parent 2cd92ee792
commit 328e60c155

View File

@ -64,7 +64,7 @@ unit rabase;
if assigned(asmmodeinfos[t]) then
writeln('Warning: Asmmode is already registered!')
else
Getmem(asmmodeinfos[t],sizeof(tasmmodeinfo));
new(asmmodeinfos[t]);
asmmodeinfos[t]^:=r;
end;
@ -101,7 +101,7 @@ finalization
for asmmode:=low(tasmmode) to high(tasmmode) do
if assigned(asmmodeinfos[asmmode]) then
begin
freemem(asmmodeinfos[asmmode],sizeof(tasmmodeinfo));
dispose(asmmodeinfos[asmmode]);
asmmodeinfos[asmmode]:=nil;
end;
end.