DynamicAlignedArray class final
Resizable array with alignment preservation
- Inheritance
- Implemented types
- Available extensions
Constructors
Properties
-
address
→ Pointer<
T> -
Available on T, provided by the StructAddress extension
The memory address of the underlying data.no setter - alignment ↔ int
-
getter/setter pair
- capacity ↔ int
-
getter/setter pair
-
data
↔ Pointer<
Uint8> -
getter/setter pair
- elementSize ↔ int
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- length ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
Pointer< NativeType> element) → void - Adds an element to the array.
-
at<
T extends NativeType> (int index) → Pointer< T> - Returns the element at the specified index.
-
dispose(
) → void - Disposes the array and frees the allocated memory.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resize(
int newCapacity) → void - Resizes the array to the specified capacity.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{int initialCapacity = 16, int elementSize = 4, int alignment = 4}) → Pointer< DynamicAlignedArray> -
Creates a
DynamicAlignedArray
instance with the specified parameters.override -
free(
Pointer< DynamicAlignedArray> ptr) → void -
Frees the allocated memory for a
DynamicAlignedArray
instance.