@nogc and NSAutoReleasePool-style regions.
via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 9 07:51:34 PDT 2014
On Wednesday, 9 July 2014 at 14:36:37 UTC, Marc Schütz wrote:
> This could also be done at the allocator level, though.
> An allocator presumably knows whether it's objects are garbage
> collected (hmm... maybe not necessarily?), and it can inspect
> types to find out whether they have destructors.
I think the advantage of using a region allocator would be to
allocate and clean up quickly without any extra overhead beyond
moving a pointer, but I guess new() could globally be restricted
to classes that does not provide a destructor…
More information about the Digitalmars-d
mailing list