We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AtomicOption
Box::drop
Right now it's leaking memory and not running destructors. This is necessary:
impl<T> Drop for AtomicOption<T> { fn drop(&mut self) { let inner = self.inner.load(Ordering::SeqCst); if !inner.is_null() { unsafe { Box::from_raw(inner); } } } }
Playground: https://is.gd/FUK0pr
The text was updated successfully, but these errors were encountered:
just hit this while sanitizing for leaks...
Sorry, something went wrong.
Fix memory leak in AtomicOption. Closes crossbeam-rs#142.
9d9ae70
mostly copied your code but SeqCst -> Relaxed because drop shouldn't get reordered before another thread's access.
drop
#153
830cd47
No branches or pull requests
Right now it's leaking memory and not running destructors. This is necessary:
Playground: https://is.gd/FUK0pr
The text was updated successfully, but these errors were encountered: