Skip to content

Commit

Permalink
fixed ref count atomic ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
amunra committed Oct 23, 2024
1 parent d3b6798 commit 8f1ddeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ unsafe fn owned_drop_impl(owned: *mut ()) {
let lifetime = owned.cast::<OwnedLifetime>();
let ref_cnt = &(*lifetime).ref_cnt;

let old_cnt = ref_cnt.fetch_sub(1, Ordering::Release);
let old_cnt = ref_cnt.fetch_sub(1, Ordering::Acquire);
if old_cnt != 1 {
return;
}
Expand Down

0 comments on commit 8f1ddeb

Please sign in to comment.