You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In rust-lang/rust#67290 we added drop guards to collections that will attempt to continue dropping in case dropping an item unwinds. That means collections will either not leak if an item unwinds during drop, or will abort.
In rust-lang/rust#75644 we've looked at preventing leaks if an unwind happens partway through initializing a MaybeUninit (usually for arrays).
We should come up with some concrete guidance on how we want to deal with leaks and unwinding
The text was updated successfully, but these errors were encountered:
Has the perf impact of this been considered? I suspect that the necessary additional loops are not exactly zero-cost. I clicked through the linked issue and as far as I can tell there's not really a motivating statement why this should be done. The thing that started it was merely the finding that there are some leaks after panic-during-drop, but no discussion why that should be changed.
@the8472 Hmm, I don't remember what consideration it had, but I think avoiding leaks where possible is important to keep a healthy runtime. The performance impact is still important, but secondary to that.
In rust-lang/rust#67290 we added drop guards to collections that will attempt to continue dropping in case dropping an item unwinds. That means collections will either not leak if an item unwinds during drop, or will abort.
In rust-lang/rust#75644 we've looked at preventing leaks if an unwind happens partway through initializing a
MaybeUninit
(usually for arrays).We should come up with some concrete guidance on how we want to deal with leaks and unwinding
The text was updated successfully, but these errors were encountered: