2 ms·
> Okay, I see where you are coming from. This is a common ask, but it works against the principles that make generational GCs performant. In my comment I alrea
by DeathArrow 2y ago
> Okay, I see where you are coming from. This is a common ask, but it works against the principles that make generational GCs performant.
In my comment I already suggested a context where GC can be turned off. I said: "It would be better if the GC can be turned off with a switch and just add a delete operator to manually free memory."
- whizzter 2y agoAnd that'd totally break down as soon as some underlying class does something you didn't expect. C++ RAII patterns and Rust's ownership systems are required for a very good reason (that the GC sidesteps but also makes all code dependent of), the NVec further up in the thread works because it's an explicit abstraction.
- pjmlp 2y agoUse the stuff from Marshal and OS interop then, there are even malloc/free variants. Also there is C++ for that, if the goal is to use C# as C++.