Section: §14.2.1 FreeAndNil
Current text:
procedure FreeAndNil(const [ref] Obj: TObject);
Problem:
FreeAndNil must set the caller's variable to nil. A const [ref] parameter (the [ref] modifier just forces pass-by-reference; it doesn't make const writable) cannot be assigned to inside the routine. The declared signature contradicts the described behavior.
Suggested fix:
Use a mutable parameter, e.g. procedure FreeAndNil(var Obj: TObject); — verify the exact current RTL declaration in System.SysUtils.pas rather than asserting const [ref].
Section: §14.2.1 FreeAndNil
Current text:
Problem:
FreeAndNilmust set the caller's variable tonil. Aconst [ref]parameter (the[ref]modifier just forces pass-by-reference; it doesn't makeconstwritable) cannot be assigned to inside the routine. The declared signature contradicts the described behavior.Suggested fix:
Use a mutable parameter, e.g.
procedure FreeAndNil(var Obj: TObject);— verify the exact current RTL declaration inSystem.SysUtils.pasrather than assertingconst [ref].