36 template <
class ElementType,
class TypeOfCriticalSectionToUse>
48 : elements (std::move (other.elements)),
49 numAllocated (other.numAllocated)
55 elements = std::move (other.elements);
56 numAllocated = other.numAllocated;
70 if (numAllocated != numElements)
73 elements.
realloc ((
size_t) numElements);
77 numAllocated = numElements;
91 if (minNumElements > numAllocated)
94 jassert (numAllocated <= 0 || elements !=
nullptr);
102 if (maxNumElements < numAllocated)
110 std::swap (numAllocated, other.numAllocated);
115 int numAllocated = 0;
void shrinkToNoMoreThan(int maxNumElements)
void realloc(SizeType newNumElements, size_t elementSize=sizeof(ElementType))
void ensureAllocatedSize(int minNumElements)
~ArrayAllocationBase()=default
ArrayAllocationBase()=default
void setAllocatedSize(int numElements)
void swapWith(HeapBlock< ElementType, otherBlockThrows > &other) noexcept
void swapWith(ArrayAllocationBase &other) noexcept