If Object does not actually point to a valid object instance, Object.Free will cause an access violation.
For example:
Object.Free;
Object.Free;
The second Free will fault.
Doug
Rob Kennedy wrote:
> David Smith wrote:
>
>> I usually follow what every example in Delphi manual does. There are
>> certain cases where freeAndNil can cause an access violation:
>>
>> Object.Free;
>> Object := nil;
>>
>
> In what way do those two lines make FreeAndNil cause an access violation?
>
>

