leak checker: also test AtomicPtr stored via 'swap'
This commit is contained in:
parent
05fcf86f11
commit
3d151c8b62
1 changed files with 4 additions and 0 deletions
|
|
@ -12,5 +12,9 @@ fn main() {
|
|||
{
|
||||
static LEAK: AtomicPtr<usize> = AtomicPtr::new(ptr::null_mut());
|
||||
LEAK.store(Box::into_raw(Box::new(0usize)), Ordering::SeqCst);
|
||||
|
||||
static LEAK2: AtomicPtr<usize> = AtomicPtr::new(ptr::null_mut());
|
||||
// Make sure this also works when using 'swap'.
|
||||
LEAK2.swap(Box::into_raw(Box::new(0usize)), Ordering::SeqCst);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue