Does Delphi assign the variable before the object is constructed?
问题 Does Delphi assign an instance variable before the object is fully constructed? In other words, given a variable: var customer: TCustomer = nil; we then construct a customer and assign it to the variable: customer := TCustomer.Create; Is it possible that customer can be not nil , but not point to a fully constructed TCustomer ? This becomes a problem when performing lazy initialization: function SacrifialCustomer: TCustomer; begin if (customer = nil) then begin criticalSection.Enter; try