Array pool
The ArrayPool
type is meant to reduce the stress on Julia Garbage Collector by maintaining the pool of preallocated arrays that the program can temporarily borrow and then return back to the pool when not needed anymore.
OptEnrichedSetCover.ArrayPool
— TypeArrayPool{T}
Helps to maintain the pool of reusable arrays of different sizes and reduce the burden on garbage collection.
Type parameters
T
: the type of array elements
OptEnrichedSetCover.acquire!
— Methodacquire!(pool::ArrayPool{T}, size) where T -> Array{T}
Gets an array of a specific size from the pool. The acquired array should be returned back to the pool using release!
. The size
could be either an integer or a tuple of integers.
OptEnrichedSetCover.release!
— Methodrelease!(pool::ArrayPool{T}, arr::Array{T}) where T
Releases the array previously obtained by acquire!
back into the pool.