Results 1 to 6 of 6

Thread: TList and object removing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    btw if you gonna iterate over list and remove elements in the process then better start from the end and do 'downto' or indexes will mess up

    also you might wanna check out generic collections that allow you to create TList<TSprite>
    in delphi its generics.collections unit and in lazarus fgl unit

  2. #2
    Quote Originally Posted by laggyluk View Post
    btw if you gonna iterate over list and remove elements in the process then better start from the end and do 'downto' or indexes will mess up
    Of course. I've thought that was no-brainer. Also didn't know that Freepascal has generic collections, thought it was only java/c# thing. Nice to know.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •