DMD 2.100, bring ont he attribute soup
deadalnix
deadalnix at gmail.com
Fri May 27 20:58:26 UTC 2022
On Friday, 27 May 2022 at 06:14:53 UTC, rikki cattermole wrote:
> I forgot to mention this in my other reply, when I talk about
> lifetimes I am not meaning about memory
> allocation/deallocation. That's a solved problem even if
> reference counting is not available on classes (we should do
> this but for other reasons).
>
> What I care about is escape analysis, to make sure say an
> owning container, does not have a member of it escape its
> lifetime. Which of course would be bad, due to the fact that
> the data structure can deallocate it.
>
> The problem I'm interested in here, is that the compiler
> guarantees that the order of destruction happens in the right
> order. This is something the GC does not do, but one that the
> compiler can and should be doing.
>
The reason you can't do RC on classes, at least safely, is
BECAUSE there is no escape analysis.
More information about the Digitalmars-d
mailing list