BufferCache class

A class to get and hold buffers.

This class implements an LRU cache.

Constructors

BufferCache({required Synthizer synthizer, required int maxSize, required Random random})
Create a cache.

Properties

hashCode int
The hash code for this object.
no setterinherited
maxSize int
The maximum size of this cache.
final
random Random
The random number generator used by getBuffer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
The current size of the cache.
no setter
synthizer → Synthizer
The synthizer instance to use.
final

Methods

destroy() → void
Destroy all _buffers.
getBuffer(AssetReference reference) → Buffer
Get a buffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune() → void
Prune the cache.
toString() String
A string representation of this object.
inherited

Operators

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