SimpleBufferPool class final
A simple power-of-two bucketed buffer pool.
Notes:
- This pool is not synchronized; intended for single-isolate use.
- Buffers are bucketed by power-of-two capacity.
- The pool is bounded by maxPerBucket to avoid unbounded growth.
- Implemented types
Constructors
- SimpleBufferPool({int minBucketSize = 256, int maxPerBucket = 32})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxPerBucket → int
-
final
- minBucketSize → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
Uint8List buffer) → void -
Returns
bufferto the pool for reuse.override -
rent(
int minCapacity) → Uint8List -
Returns a buffer with capacity >=
minCapacity.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited