System.Generics.Collections.TStack.Clear

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Clear; inline;

C++

void __fastcall Clear();

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Generics.Collections.pas
System.Generics.Collections.hpp
System.Generics.Collections TStack

Description

Clear stack.

Clear pops all entries from the stack. Count, the number of entries on the stack, is set to zero. The capacity is also set to zero. This is an O(n) operation where n is Count.

Note: Clear does not free the items as they are popped. If you need to free them, use the OnNotify event, which occurs for every pop and provides the popped item.

See Also

Code Examples