Destructor nonsense on dlang.org
Jacob Carlborg
doob at me.com
Sat May 26 08:36:15 PDT 2012
On 2012-05-26 14:28, foobar wrote:
> Huh? In my model FooA has no destructor.
Hm, right. But if a destructor of a class isn't guaranteed to be called,
how can it guarantee that the struct's destructor will be called?
> I indeed propose that structs allocated with "new" will be put in region
> of the heap *not* managed by the GC. It's a tiny price to pay to get
> more orthogonal semantics which are easier to reason about.
> Please note that this only affects code that directly uses pointers
> which is not common in D and is geared towards more advanced use cases
> where the programmer will likely want to manage the memory explicitly
> anyway.
I see.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list