Hello guys,
I am using a recursive code with many cycles (7m +) in the Editor mode. The thing is, if I go beyond that, I am running out of memory.
After having done some research, apparently there is a way around this, by using the HDD space temporary, saving and obtaining information for my recursion somehow.
Please point me in the direction, where I can learn how to use this strategy with .Net and Mono.
Thank you very much!
Well… first you probably want to turn your recursive algorithm into an iterative one by using a stack:
Then maybe it already works, because you actually just hat a stack overflow and not really no more memory.
If you actually run out of heap memory, you can try to temporarily save some of your stuff to HDD if it makes sense for your algorithm. It doesn’t make sense if you need to access all the data all the time, because then putting it on HDD and getting it out 100ms later will kill your performance.