Sign in Join
FPDoc Onlineexperiment

TLinkList.GetNewItem function

Member of TLinkListprotectedIn unit LazLinkedList

Gets a new linked list item by reusing a free item or creating a new one.

Declaration

pascal
function GetNewItem: TLinkListItem

Function result

Linked list item reused or created in the method.

Description

GetNewItem is a TLinkListItem function used to get a new item for the doubly linked list. GetNewItem checks for an unused item in the linked list, and creates a new TLinkListItem instance when a free item is not found. A reused item is updated to remove the Prior and Next traversal nodes in the linked list item. A new item is retrieved by calling the CreateItem method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.