RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TObjectStack.Create Constructor (Boolean)

Create TObjectStack instance.

Pascal
constructor Create(AOwnsObjects: Boolean = True); overload;
constructor Create(Collection: TEnumerable<T>; AOwnsObjects: Boolean = True); overload;
C++
__fastcall TObjectStack(Boolean AOwnsObjects = True);
__fastcall TObjectStack(TEnumerable<T> Collection, Boolean AOwnsObjects = True);

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!