Revert changes to release shared_vec

This commit is contained in:
Nikolay Kim 2024-01-19 17:17:08 +06:00
parent bf0b53c630
commit 18680ea05b
4 changed files with 9 additions and 5 deletions

View file

@ -3662,11 +3662,11 @@ fn release_shared_vec(ptr: *mut SharedVec) {
// [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
atomic::fence(Acquire);
// Drop vec
// Drop the data
let cap = (*ptr).cap;
(*ptr).pool.release(cap);
Vec::<SharedVec>::from_raw_parts(ptr, 1, cap / SHARED_VEC_SIZE);
ptr::drop_in_place(ptr);
Vec::<u8>::from_raw_parts(ptr as *mut u8, 0, cap);
}
}