Re:Ruby Outperforms C: Breaking the Catch-22
by iudqnolq on Saturday September 09, 2023 @09:48AM
(#37445362)
No. Drop has straightforward rules.
Find the scope you can refer to the variable in, i.e. the curly brackets it is contained in. That variable is dropped right before the closing curly bracket. Things are dropped in reverse order of creation.
Find the scope you can refer to the variable in, i.e. the curly brackets it is contained in. That variable is dropped right before the closing curly bracket. Things are dropped in reverse order of creation.
(Similar rules apply to dropping temporaries)
https://doc.rust-lang.org/reference/destructors.html