3 ms·
Exactly. Idiomatic C# code does not depend on finalizers to release resources. Finalizers are typically only used as a last resort to prevent handle leaks, it i
by superjan 4y ago
Exactly. Idiomatic C# code does not depend on finalizers to release resources. Finalizers are typically only used as a last resort to prevent handle leaks, it is only memory deallocation that is nondeterministic.
- pjmlp 4y agoAnd even then, SafeHandle is a much better option. Memory deallocation can be done as deterministic as malloc/free via the native heap APIs.