System.Generics.Collections.TQueue.Clear
Delphi
procedure Clear; inline;
C++
void __fastcall Clear(void);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TQueue |
Description
Empty queue.
Clear removes all entries from the queue. Count is set to 0. This does not change the capacity. This is a O(n) operation where n is the length of the queue.
Note: Clear does not free the items as they are dequeued. If you need to free them, use the OnNotify event, which occurs for every item dequeued and provides the dequeued item.
See Also
Code Examples