What would you call something whose primary function is triggered on Drop?
Would it be uncontroversial to call it a "drop guard"?
Say, for instance, you have an object that begins measuring time on creation and when it is dropped it will calculate the duration of the object and log how long it lived. Would it be correct to say that it is a "timing drop guard"?
I think "drop guard" is appropriate and understandable.
just for the record, a generic construct is named "scope guard"[1] in scopeguard, one of the most used crates (almost 500M total downloads on crates.io as of now -- the end of 2025).
although it's really about drops, not scopes: the guard can be moved anyway âŠī¸