January 15

On 1/15/22 12:03 AM, Elronnd wrote:

>

On Friday, 14 January 2022 at 23:28:44 UTC, Adam Ruppe wrote:

>

Currently calling .destroy(class_object) fails the @nogc tests.

Practical Q: how many people are using classes without gc?  And how many of those people are actually using @nogc vs just not linking the gc in the first place?

Destructors can't allocate if running inside the GC. This makes them perfect candidates for @nogc.

So even if you use classes, and allocate them on the heap, running the destructors really should be tagged as @nogc (and who are we to say why anyone should or shouldn't be using the GC in any specific spot?)

-Steve

Next ›   Last »
1 2