System.Generics.Collections.TObjectStack.Create
Delphi
constructor Create; overload;
constructor Create(AOwnsObjects: Boolean); overload;
constructor Create(const Collection: TEnumerable<T>; AOwnsObjects: Boolean = True); overload;
C++
__fastcall TObjectStack__1()/* overload */;
__fastcall TObjectStack__1(bool AOwnsObjects)/* overload */;
__fastcall TObjectStack__1(TEnumerable__1<T>* const Collection, bool AOwnsObjects)/* overload */;
/* {System_Generics_Collections}TStack<System_Generics_Collections_TObjectStack<T>_T>.Create */ inline __fastcall TObjectStack__1(TEnumerable__1<T>* const Collection)/* overload */ : TStack__1<T>(Collection) { }
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TObjectStack |
Description
Create TObjectStack instance.
This overloaded method creates a TObjectStack instance.
The AOwnsObjects parameter is a boolean that indicates whether object entries are owned by the stack. If the object is owned, when the entry is removed from the stack, the object is freed. The OwnsObjects property is set from the value of this parameter. The default is true.
Collection is a collection with which to initialize the stack. The objects are pushed on the stack in the same order as in Collection. If Collection is specified, the creation is an O(n) operation, where n is the number of items in Collection.