-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deallocate ThinBox even if the value unwinds on drop #106239
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @Amanieu (because this is about panic in Drop) |
56450b9
to
ce28b4d
Compare
@bors r+ |
I've noticed that |
Panics in drop are known to leak memory in all sorts of places since it's so hard to handle them reliably. Hence my attempt in rust-lang/rfcs#3288 to make panics in drop always abort. |
The only place they can leak memory is with types with custom (And my position on silently changing the stable behavior of |
☀️ Test successful - checks-actions |
Finished benchmarking commit (df75643): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
This makes it match the behavior of an ordinary
Box
.