FreeList.fill

Ensures that the free list contains at least the specified number of (idle) items. Useful to pre-allocate a free list of a certain size.

class FreeList(T)
typeof(this)
fill
(
size_t num
,)
out { assert (this.free_list.length >= num); }

Parameters

num size_t

minimum number of items desired in pool

new_item ItemType

expression that creates a new instance of T

Return Value

Type: typeof(this)

this

Meta