Nested Classes with inheritance
rtcvb32 at yahoo.com
Sat Mar 19 05:25:01 UTC 2022
On Saturday, 19 March 2022 at 00:16:48 UTC, user1234 wrote:
> That crashes because of the creation of `Bar b` member, which
> itself has a Bar b member, which itself...
Mhmm... So There's Foo with Bar b, which has Bar b which has Bar
b which... just keeps going over and over again.
It appears to me that it only crashes when you fully run out of
memory then. Much like a function calling itself and you exhaust
all your stack space.
I'd suggest avoiding self-inheritance. No one wants to be their
More information about the Digitalmars-d-learn