TObjectList<T>.Contains causes Access Violation in Delphi 2009
问题 In Delphi 2009, I had no major problems with Generics so far (using Generics.Collections lists, with no special Generics features). Now I found this code will cause an AV in the line which accesses MyList.Contains . The error disappears if I declare TMyList = class(TList<TMyEntry>) ; Should I avoid TObjectList<T> or is something else in my code causing this error? type TMyEntry = class(TStringlist); TMyList = class(TObjectList<TMyEntry>); procedure TListTests.TestAV; var Entry: TMyEntry;