4 ms·
Freeing memory, releasing locks, closing files (though destructors are less expressive than separate close methods because destructors can't return error codes,
by nyanpasu64 5y ago
Freeing memory, releasing locks, closing files (though destructors are less expressive than separate close methods because destructors can't return error codes, which is why I want linear types which can make calling a close() method mandatory), committing transactions (though some argue it should be an explicit function call)...
- pjmlp 5y agoIn .NET land there are Roslyn analysers that trigger a compiler error if you don't call using on a IDisposable type.