3 ms·
Most languages with garbage collection also have a mechanism for deterministic cleanup, e.g. IDisposable in C#, or AutoClosable in Java. That's because when dea
by ygra 10y ago
Most languages with garbage collection also have a mechanism for deterministic cleanup, e.g. IDisposable in C#, or AutoClosable in Java. That's because when dealing with external, or non-memory resources, deterministic release is a good thing. That doesn't mean that that scheme has to be the only option for memory allocations. Garbage collection has a lot of benefits, too.