I want to know disposed record by pointer variable.
For example, I have the record like below and the global variables(T, P).
TTest = record
iA: Integer;
sA: string;
end;
pTest = ^TTest;
T: pTest;
P: Pointer;
And then call below procedure.
...
procedure TestCreate;
begin
New(T);
T^.iA := 100;
T^.sA := 'ABCD';
// 1.
P := T;
// 2.
Dispose(T);
// 3.
WriteLn( IntToStr(pTest(P)^.iA) );
// -> Show the 100
end;
Is there a way I can know with pointer 'P' that if record 'T' has been disposed?