Quote:Original post by vininimI'd say you're onto something there. That's nearly 200K for a single call of this function alone. It would be best to dynamically allocate that large array, or better yet, simply use a std::vector![cool]
*** Source Snippet Removed ***
So you have recursion with a static array of 50000 itens, might be that. Might, I'm not bothering to check if it's called.
To the OP, I'm not sure you understand that your int test[100000]; takes up space on the stack the moment that the function containing that definition is entered, NOT after the call to add3DResource. It does not matter where in the function you put that declaration as it always takes up space right from the beginning.