Is an array of an object stored in stack or heap ?
This really depends how an array is declared.For example: void Function() { int Array[100]; This one is on Stack. Of course! But this one is on Heap: void Function() { std::vector Array = { ... }; But there is a problem. This is std::vector declaration: template< class T, class Allocator = std::allocator > class vector; Notice std::allocator. Default allocator uses Heap but nothing stops you of using _alloca to allocate memory on Stack. Or wherever you want.