Y
Hacker News
new
|
ask
|
show
|
jobs
by
rustacean
223 days ago
In Rust, there’s a drop guard pattern to do this, which leverages the lazy execution of closure, checkout the scopeguard crate. C++ should be easy to do that too I think