System.Generics.Collections.TObjectStack
Delphi
TObjectStack<T: class> = class(TStack<T>)
C++
template<typename T> class PASCALIMPLEMENTATION TObjectStack__1 : public TStack__1<T>
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | System.Generics.Collections |
Description
Last in, first out stack of objects.
TObjectStack represents a last in, first out stack of objects of the same type. It is of arbitrary size, expanding as needed. You can push nil on the stack.
TObjectStack is a TStack with the capability of automatically freeing object entries when they are removed from the stack. When a TObjectStack is instantiated, an AOwnsObjects parameter specifies whether the stack owns the stack entries. If the entry is owned, when the entry object is removed from the stack, the entry object is freed.
The OwnsObjects property gets or sets object ownership.
See Also
Code Examples