How can I determinate the size of a Function Stack?
When I have a lot of code and I organize and wrap those codes into small functions and maybe re-use them. But is it posible that I could crash the application if a don't consideer how many functions is the function in execution have? The only way that my application crashed by that reason is using recursive function that is not very well design.
I hope that somebody could answe...
Thanks...
Loading
Roy SPosted Aug 6, 2010, 7:51 PM
int tmp = 0;
private void recMethod()
{
tmp++;
recMethod();
}
If I remember correctly tmp was about 15000 or 25000.
Sam HobbsPosted Aug 7, 2010, 4:40 PM
Hector Hugo Alpizar CesenaPosted Aug 7, 2010, 12:35 AM
Hector Hugo Alpizar CesenaPosted Aug 6, 2010, 6:59 PM
Roy SPosted Aug 6, 2010, 5:54 PM
If a recursive method gave a StackOverflowException there must be something wrong with the code but other than that it shouldn't happen.