4 ms·
That's what the concept of "Finalizers" is for. They indicate that something should be done to an object just before the runtime garbage collects it. https://e
by frou_dh 7y ago
That's what the concept of "Finalizers" is for. They indicate that something should be done to an object just before the runtime garbage collects it.
https://en.wikipedia.org/wiki/Finalizer https://en.wikipedia.org/wiki/Finalizer
Files specifically are a bit thorny because the OS generally places a limit on how many simultaneous open files a process can have, and you don't want to risk bumping in to that limit due to unpredictable garbage collection timing.