On Friday, 19 June 2015 at 19:10:11 UTC, Shachar Shemesh wrote:
On 14/06/15 04:31, 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
On 14/06/15 04:31, 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 a struct on the heap is
On Wed, 17 Jun 2015 06:02:46 +, WhatMeWorry wrote:
> I guess the question would be why would one want a struct on the heap
> and a class on the stack? Performance reasons?
struct on the heap: some containers, for example, doing their own memory
management.
class on the stack: guaranteed de
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 a
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 a
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 a struct on the heap is trivial and built into the
language: `S
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?