开发者

.NET stack overflow?

开发者 https://www.devze.com 2023-02-08 23:33 出处:网络
In my VB.NET application, sometimes, I do heavy and deep iterations. Very long ones. It seems that, in some cases I get a stack overflow error, where apparently my application thinks I got an infinite

In my VB.NET application, sometimes, I do heavy and deep iterations. Very long ones. It seems that, in some cases I get a stack overflow error, where apparently my application thinks I got an infinite loop or something, which I don't blame, I call a function quite a lot of times actually...

What should I do? This is a tile-based map editor, where I use the flood fill algorithm (found in Wikipedia开发者_JS百科). If I use the flood fill tool on big maps, I get that error. But is there a way to tell the system to "just keep going dude, you'll get there" or something? I have seen other applications that can use flood fill on huge maps so I don't really want to disable/limit this feature in mine.


"just keep going dude, you'll get there" - You should just read the subsequent sections in the Wikipedia article. The examples don't use recursion. =)

0

精彩评论

暂无评论...
验证码 换一张
取 消