Are stack+heap classes possible in D?

2015-06-13 Thread FujiBar via Digitalmars-d-learn
I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. Well, I often have classes where I want some instances on the stack, some on the heap. So.. what to do?

Re: Are stack+heap classes possible in D?

2015-06-13 Thread FujiBar via Digitalmars-d-learn
On Sunday, 14 June 2015 at 01:31:25 UTC, Adam D. Ruppe wrote: On Sunday, 14 June 2015 at 00:52:20 UTC, FujiBar wrote: I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. That's not true; it is a really common misconception. Putting