Michael Novello wrote:... since non-local variables are kept on the stack.
It's local variables that are kept on the stack. Member variables go on the heap as part of their containing objects.
You're right that the infinite recursion is what's causing the overflow, but it's not the member variable. It's simply that, whether you have 0 local varaibles or 1000, every method call creates a new stack frame with, at the very least, the PC telling us where to resume execution after the method completes.