Currently, the GC only finalizes classes. structs/arrays, allocated via the GC, are not finalized.

I don't have much experience with GC, so ...

Question: Is this the intended behavior, or is it currently only a limitation? WIll we ever have a GC that is capable of finalizing structs/arrays?

Question2: If the idea is that the GC *should* finalize, then how are we supposed to specify the finalizer to the GC when we allocate via GC.malloc ? There is apparently a GC.BLKAttr.FINALIZE, but how do you specify *how* to finalize...?

My "big" worry is that when we finally have a GC that can handle built-in array finalization, all our code that manually manages memory (for example: "std.array.array") will become buggy...

Thoughts? Insight?

Reply via email to