RAD Studio Athens

E2584

Go Up to Error and Warning Messages (Delphi)


This occurs whenever weak references are used with arrays or any other types other than classes and interfaces.

  TMyComponent = class
  private
    [Weak] GiveMe: array of Integer;   // error, an array cannot be weak.
  end;

This can be fixed by using the weak reference with a class instead:

  TMyComponent = class
  private
    [Weak] TS: TStringList; // it’s ok, a class can be weak
  end;