3 ms·
Most languages have a rule of thumb when it comes to freeing resources; it is your responsibility to abide by them. Rust: drop C++: T::~T() C#: using + d
by hfoiwufasdfw 2y ago
Most languages have a rule of thumb when it comes to freeing resources; it is your responsibility to abide by them.
Rust: drop
C++: T::~T()
C#: using + dispose
Java: try-with + autocloseable, or finally
Go: defer
Haskell: bracket
JavaScript: finally
Python: finally or with + __exit__
Don't like it? Vote for linear types.