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 S194 reputationPosted Aug 6, 2010, 3:51 PM EDT
int tmp = 0;
private void recMethod()
{
tmp++;
recMethod();
}
If I remember correctly tmp was about 15000 or 25000.
Roy S194 reputationPosted Aug 6, 2010, 1:54 PM EDT
If a recursive method gave a StackOverflowException there must be something wrong with the code but other than that it shouldn't happen.
Hector Hugo Alpizar CesenaRank #5,573 · 294 reputationPosted Aug 6, 2010, 2:59 PM EDT
Hector Hugo Alpizar CesenaRank #5,573 · 294 reputationPosted Aug 6, 2010, 8:35 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Aug 7, 2010, 12:40 PM EDT