On Thursday, 18 March 2021 at 12:27:56 UTC, Petar Kirov
[ZombineDev] wrote:
On Thursday, 18 March 2021 at 09:21:27 UTC, Per Nordlöw wrote:
[...]
Just implementation deficiency. I think it is fixable with some
refactoring of the GC pipeline. One approach would be, (similar
to other language implementations - see below), that
GC-allocated objects with destructors should be placed on a
queue and their destructors be called when the GC has finished
the collection. Afterwards, the GC can release their memory
during the next collection.
[...]
Small correction, since .NET 5 / C# 9, implementing IDisposable
isn't required if the Dispose() method is available.
This is done as performance improvement for using structs with
determistic destruction and avoid implicit convertions to
references when interfaces are used.