Menu

#381 Compilation error under Delphi 10.4 for DPF.iOS.Common unit

open
Bug
2021-11-15
2021-11-15
No

In n order to build the packcage with Delphi 10.4, you need to modify the DisposeOfAndNil procedure header in DPF.iOS.Common.pas to this:

procedure DisposeOfAndNil({$IFDEF AUTOREFCOUNT}var Obj{$ELSE}const [ref] Obj: TObject{$ENDIF});

Only then compiler will be able to build the source code. Without this change, the System.SysUtils.FreeAndNil will not accept Obj variable as argument during compilation.

The change to the header follows directly how the argument for FreeAndNil is declared in the System.SysUtils.pas, so perhaps the implementation changed in Delphi 10.4 comparing to earlier versions. If so, maybe some more conditional directives need to apply, or maybe this current declaration can also cover all the older versions, I only tested on 10.4 version of Delphi.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.