PointPool class

A pool for managing Point structs

Inheritance

Constructors

PointPool({required int capacity})
Constructs a PointPool with the given capacity.

Properties

allocated → int
Returns the number of allocated structs.
no setterinherited
available → int
Returns the number of available slots in the pool.
no setterinherited
capacity → int
Returns the total capacity of the pool.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isDisposed → bool
Returns whether the pool has been disposed.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allocate() → Pointer<Point>?
Allocates a Point from the pool.
allocateMany(int count) → List<Pointer<Point>>
Allocates multiple Point structs from the pool.
debugState() → String
Returns a string representation of the pool state for debugging.
dispose() → void
Disposes the pool, freeing all allocated memory.
free(Pointer<Point> pointer) → void
Frees a Point back to the pool.
freeMany(List<Pointer<Point>> pointers) → void
Frees multiple Point structs back to the pool.
markDisposed() → void
Marks the pool as disposed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited