SharedArray<T extends NativeType> class

Reference counted Array. Not thread safe!

Annotations
  • @sealed

Constructors

SharedArray(Array<T> array)
Takes ownership of arr

Properties

counter int
no setter
deleted bool
no setter
hashCode int
The hash code for this object.
no setterinherited
length int
no setterinherited
ptr Pointer<T>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

forceFree() → void
Deletes the shared Array, even with [counter] > 0. Calling this method multiple times does nothing.
free() → void
Deletes _array when counter has reached 0. Calling this method multiple times does nothing.
newShared() SharedArray<T>
Returns this and updates counter. Throws StateError when this has already been deleted or when counter overflows.
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