You are not logged in.
Pages: 1
Delphi 11.1, mORMot 3506
The description of the FillZero function is as follows:
/// fill all sensitive fields of this class or record with zeros
// - RawByteString/TBytes with refcount=1 will be zeroed before freed
procedure FillZero(Info: PRttiInfo; var Value); overload;
So the following source code should work:
type
TLicenseData = record
CustomerNum: Integer;
CustomerName: RawUtf8;
CustomerAddress: RawUtf8;
LicenceDate: TDate;
ProductName: RawUtf8;
end;
var
licData: TLicenseData;
begin
FillZero(TypeInfo(TLicenseData), licData);
But I get the following error message:
ExceptionMessage="Access violation at address 007CE36C. Read of address 00000000"
FileName="...\mORMot2\src\core\mormot.core.rtti.pas"
LineNumber=6082
With best regards
Thomas
Offline
Please try with https://github.com/synopse/mORMot2/commit/c873fa00
Offline
Pages: 1