Compiler Attributes
Go Up to Attributes Index
Some special attributes trigger certain features of Delphi compilers.
Contents
Ref
The Ref
attribute is used to qualify constant function parameters so that they are passed by reference (not by value) to the function. For more information, see Constant Parameters.
Unsafe
Tag the Result
of a function as Unsafe
to make the compiler treat the function result as “unsafe”, which disables ARC management of the object. For more information, see The Unsafe Attribute.
Volatile
The volatile
attribute is used to mark fields that are subject to change by different threads, so that code generation does not optimize copying the value in a register or another temporary memory location.
type
TMyClass = class
private
[volatile] FMyVariable: TMyType;
end;
Weak
The weak
attribute is used to mark a declaration as a weak reference. For more information, see Weak References.