Question – Stack overflow – Unity Forum

The stack keeps track of the functions you’ve called. Each function gets a stack frame to store stuff like “what are my local variables?” and “where do we go when I’m done?”

If you call a ton of functions in a row, without any of them ever getting a chance to finish running, you’ll run out of space on the stack. This cause you to “overflow” the region of memory used to hold the stack. Hence, you get a “stack overflow”.

This usually happens because of infinite recursion: a function calling itself without ever hitting a stopping point.

Properties are just fancy syntax for functions. So, a property that returns itself is just a function that calls itself!

 

Read more here: Source link