Leave GC collection to the user of the D library?
IGotD-
nise at nise.com
Sun May 9 16:29:12 UTC 2021
On Sunday, 9 May 2021 at 16:08:07 UTC, Ola Fosheim Grøstad wrote:
>
> I wonder what you think about task-bound GC?
>
> https://forum.dlang.org/post/yqdwgbzkmutjzfdhotst@forum.dlang.org
I see it as a special case where memory management is bounded to
a certain primitive/ways of programming. Also a pool for each
possible primitive will increase the meta data.
Then you also mention that when the actor is destroyed no scan is
needed because the pool is explicitly destroyed as well. This is
basically a form of deterministic cleanup that you would expect
in C++ when using unique_ptr for example.
Some in that thread mention that D must head towards RC and
that's what my opinion is as well. As Walter do not want to make
a special fat pointer type, at least making Phobos/druntime using
RC internally would be a step in the right direction.
More information about the Digitalmars-d
mailing list