-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
This behaviour is the same of TArray<T>, but maybe there could be a way of solving this.
When using with classes, e.g. TBetterArray<TObject>, the internal list keeps a wrong reference of the objects even after they are destroyed:
var
Objects: TBetterArray<TObject>;
Obj1: TObject;
begin
Obj1 := TObject.Create;
Objects := [Obj1];
FreeAndNil(Obj1);
CheckFalse(Assigned(Obj1)); // ok
CheckFalse(Assigned(Objects[0])); // error: should be false, but returns true
end;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels