Re:Lies we tell ourselves to keep using Golang
by maleldil on Tuesday November 26, 2024 @05:00AM
(#42244203)
The exact same way it works in Rust. C++'s RAII works the same as Rust's Drop trait. The object is released when it goes out of scope, and if it's shared (e.g. Arc), it's released when the last reference to it drops.
[ Parent
| on HN ]
There are no comments on this comment yet.