Generic Linked List for Delphi 2009

前端 未结 4 1290
南笙
南笙 2021-01-19 09:16

I was looking in Generics.Collections and noticed there was no linked list. Sure they are simple to make, but I thought it was odd there was not one (or I just missed it).

4条回答
  •  花落未央
    2021-01-19 09:31

    Isn't that what tStringList is for?

    (ducking)

    Actually, any generic tList works fine as a linked list, and supplies most of the functionality needed. The ancient technique passed down from our ancestors of storing a pointer to memory in each record, and navigating to that has been easily replaced by dynamic arrays and doing things...more generically.

提交回复
热议问题