Allocating structs with new?

Justin Johansson no at spam.com
Sat Jul 10 06:15:44 PDT 2010


bearophile wrote:
> Jonathan M Davis Wrote:
> 
>> I thought that classes always went on the heap and that structs always went on 
>> the stack
> 
> Structs can be allocated on the heap, and then referenced by pointer. This is not something I can live without.
> Explicit delete is a problem with a language based on GC, it has to be removed with care.
> 
> Bye,
> bearophile

With care?  That doesn't say very much except for possibly an
unintended suggestion that the OP is not trying to use care.
He is posting because he does care.

Sorry bearophile, but can you please better explain in the context
of the OP's original dilemma just what kind of care is needed to
bake this cookie.

Cheers,
Justin Johansson


More information about the Digitalmars-d mailing list