Making my own array wrapper vs. ArrayAllocationBase


I am making my own wrapper for an array
using templated typename T and length N
to create the local variable T arr[N] in the class

Ideally I’d like to just use juce’s Array and OwnedArray classes. But I want my arrays to be on the stack (not on the heap) for efficiency… and since the ArrayAllocationBase holds a pointer to an array I think I should use my own wrapper

Any experienced juce/C++ people have thoughts on this?


Sounds a bit scary to me - big arrays on the stack can cause stack overflow problems. And if the arrays are only small, is there any point in having a class to manage them?