Original Post
hi,
a question that torments me for so much time.
Suppose I'm at the main() function and NEWed a class on the heap.
X x = new X;
and this X class holds inside itself many huge data structures like maps, sets, vectors, etc. But they are all declared like this
class X {
std::map< z, w> map;
std::vector< z> vec;
};
let's supposed they are filled and HUGE. Where are they located? in the Heap of the in the Stack?
a question that torments me for so much time.
Suppose I'm at the main() function and NEWed a class on the heap.
X x = new X;
and this X class holds inside itself many huge data structures like maps, sets, vectors, etc. But they are all declared like this
class X {
std::map< z, w> map;
std::vector< z> vec;
};
let's supposed they are filled and HUGE. Where are they located? in the Heap of the in the Stack?