you clear the stack by either: a) making sure your recursive logic terminates, or
b) making the method/function non-recursive. Yes, one can run out of stack space -- it's usually caused by poorly designed recursive functions. jim Jim McWilliams Managing Director, Risk Information Systems & Consulting [EMAIL PROTECTED] > -----Original Message----- > From: The DOTNET list will be retired 7/1/02 > [mailto:[EMAIL PROTECTED]]On Behalf Of franklin gray > Sent: Wednesday, June 05, 2002 11:14 AM > To: [EMAIL PROTECTED] > Subject: [DOTNET] recursive stack trace > > > I have a recursive function that calls itself many times. If an > error occurs, I notice that the call stack is very large. > > Two questions: > > 1) Will this stack overflow? > > 2) Is there a way to clear the stack after each call? > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.