While grepping the standard library in #159644, I noticed that the Drop impl for UniqueArcUninit is declared as
|
#[cfg(not(no_global_oom_handling))] |
|
impl<T: ?Sized, A: Allocator> Drop for UniqueArcUninit<T, A> { |
This means that on builds with that option enabled, the memory is leaked if into_arc is not called. Note that with the way that UniqueArcUninit is currently used, this can only happen when T::clone panics in Arc::<T, A>::try_clone_from_ref_in, since the other functions that use the type are disabled too.
@rustbot label requires-nightly I-memleak A-allocators
While grepping the standard library in #159644, I noticed that the
Dropimpl forUniqueArcUninitis declared asrust/library/alloc/src/sync.rs
Lines 4330 to 4331 in cde3f8a
This means that on builds with that option enabled, the memory is leaked if
into_arcis not called. Note that with the way thatUniqueArcUninitis currently used, this can only happen whenT::clonepanics inArc::<T, A>::try_clone_from_ref_in, since the other functions that use the type are disabled too.@rustbot label requires-nightly I-memleak A-allocators