The Default magic function in Delphi
Posted by jpluimers on 2016/03/17
Stefan Glienke worded it perfectly: Default(typeIdentifier) is a “magic” function that is implemented into the compiler and causes it to generate the correct code – like for records with managed fields it generates a call to FinalizeRecord and some instructions to zero the remaining fields.
Source: I know I can write MyRecordVar := Default(TMyRecordType) because I asked a qu…
–jeroen






Leave a comment