Destructors vs. Finalizers
Daniel Kozak via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 26 07:30:30 PDT 2017
@delete() {}
delete() {}
On Wed, Jul 26, 2017 at 3:08 PM, jmh530 via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:
> On Wednesday, 26 July 2017 at 12:55:17 UTC, Mike Parker wrote:
>
>> ---
>>> ~this() {} // Finalizer
>>> ~this() @nogc {} // Finalizer
>>> ~this @deterministic {} // Destructor
>>> ~this @nogc @deterministic {} // Destructor
>>> }
>>>
>>
>> Yeah, this brings with it more flexibility. I'd prefer to avoid adding a
>> new attribute for it, but this looks more interesting.
>>
>>
>>
> Some other options:
> ~~this() {}
> !this() {}
> !~this() {}
> this!(true) () {} //not really a big fan of this version
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170726/0067a896/attachment.html>
More information about the Digitalmars-d
mailing list