Original Post
hi!, I've just got stucked in some memory problems, and they might be related to misuse of vector memory allocation. What I'm doing is this: class MYCLASS { std::vector <DWORD> MyVector; MYCLASS() { MyVector.resize(50000); } }; int main(. . .) { MYCLASS myc; myc.usage... } The problem is: as far as I understand, std::vector uses 'New' as an internal memory allocator, so, when the MYCLASS is allocated in the stack, it calls it constructor, which calls the constructor of the vector (which in theory, should call new to allocate the array in the heap) But what happens is that the program runs out of (stack) memory fast, so that's making me think that the full 50000 array is also allocated in the stack. In practice, I'm storing a structure instead of DWORDS, which might be enough to deplete the stack, but very far to eat all the heat memory. any help?