Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: TObjectList<>.Remove führt zur AV, .Clear nicht?!

  Alt 3. Apr 2010, 00:29
Hi,

Wie hast du diese Liste erstellt? Je nachdem gibt es da einen Bug, dass der Default-Comparer nicht gesetzt wird. Und dann knallt es.

Empfehlung des Tages:

Delphi-Quellcode:
var List: TObjectList<TVirtualWall>;
begin
  List := TObjectList<TVirtualWall>.Create(IComparer<TVirtualWall>(nil));
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat