Closed glandium closed 5 years ago
Like BoxAllocation, VecAllocaton should have an impl Drop that removes the element that was added if no initialization happened.
BoxAllocation
VecAllocaton
impl Drop
No, VecAllocation doesn't need a drop. There is no element added that should be removed: all that's been done by that point is reservation change to the vector, which is fine to leave.
VecAllocation
Like
BoxAllocation
,VecAllocaton
should have animpl Drop
that removes the element that was added if no initialization happened.