template<class ElementType, class TypeOfCriticalSectionToUse>
class juce::ArrayAllocationBase< ElementType, TypeOfCriticalSectionToUse >
Implements some basic array storage allocation functions.
This class isn't really for public use - it's used by the other array classes, but might come in handy for some purposes.
It inherits from a critical section class to allow the arrays to use the "empty base class optimisation" pattern to reduce their footprint.
- See also
- Array, OwnedArray, ReferenceCountedArray
template<class ElementType, class TypeOfCriticalSectionToUse>
Increases the amount of storage allocated if it is less than a given amount.
This will retain any data currently held in the array, but will add extra space at the end to make sure there it's at least as big as the size passed in. If it's already bigger, no action is taken.
- Parameters
-
minNumElements | the minimum number of elements that are needed |