How to increase c # visual studio stack memory to avoid stack overflow exception
- To enter on the other hand - do not write code that goes so deep into the stack. - Igor
- ru.stackoverflow.com/a/458425/10105 - VladD
- oneBut in general, it makes sense to simply improve the algorithm. - VladD
|
1 answer
As I understand it, this is a recursive algorithm, as in any other situations I don’t see a way to catch the stack overflow error.
So, any recursive algorithm can be rewritten in the form of cycles using the software stack ( Stack<T> ) and the cycle. Accordingly, rewriting the algorithm you will get away from this error.
- I just have a program about building a house, there are a lot of bool variables and cycles, in theory everything is correct, but when I started adding 12 more cycles and several dozen bool variables, the program was covered) - Lavrik Kan
- @LavrikKan, it means a cant in the algorithm. A standard stack should suffice. - iluxa1810
|