Destructor nonsense on dlang.org
Tove
tove at fransson.se
Thu May 24 13:53:32 PDT 2012
On Thursday, 24 May 2012 at 19:46:07 UTC, foobar wrote:
> Looks to me like an issue with separation of concerns. I think
> that dtors need to only provide deterministic management of
> resources and not affect GC algorithms:
> 1. classes should *not* have dtors at all.
> 2. struct values should *not* be gc managed [*].
>
Why not simply set "BlkAttr.NO_SCAN" on ourselves if we need
certain resources in the destructor? Assuming we one day get user
defined attributes, it can be make quite simple...
More information about the Digitalmars-d
mailing list