What is the meaning of the {$ C PRELOAD} directive?

I found this directive declared in Controls.pas (and also in other units) and I will be glad to know what this means.

{$C PRELOAD} 

As far as I know, control over $ C means approval, but what is the keyword PRELOAD? Is it something like "claim me during preload"?

I found this in Delphi 2009

thanks

+7
source share
2 answers

The $C directive is called the Code segment attribute and, in conjunction with the keywords MOVEABLE, FIXED, DEMANDLOAD, PRELOAD, DISCARDABLE, PERMANENT, changes the attributes of the code segment.

 {$C MOVEABLE DEMANDLOAD DISCARDABLE} // this is setting Code Segment Attribute. 

if you use the $C directive with + or - , which you use to enable or disable the generation of code for claims.

example:

 {$C+} { Assertions - On } 
+7
source

{$C+} and {$C-} for statements. {$C PRELOAD} is a transfer from 16-bit programming, where it preloads a segment of a single code into memory immediately at runtime, rather than waiting for the first access of the segment. This became unnecessary in Delphi 2 when 32-bit programming occurred, so I don’t know why the VCL source still uses it.

+6
source

All Articles