Browse Source

* Use new and dispose for asmmodeinfos

Michaël Van Canneyt 4 months ago
parent
commit
328e60c155
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/rabase.pas

+ 2 - 2
compiler/rabase.pas

@@ -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.