I have a question about use of global variables and variables of class using class var
.
Declaring variables in class with class var
:
unit Unit1;
interface
type
TClass = class
public
class var ObjectList: TObjectList
end;
implementation
end.
Declaring global variables:
unit Unit1;
interface
var
ObjectList: TObjectList
implementation
end.
How does the compiler allocate memory for these two variables?
ObjectList
pointer will reside in DATA segment. – Free Consulting