Closed kendru closed 2 years ago
The atomic decrement to rc should be performed with an ordering of Ordering::Release rather than ordering::Relaxed to interact correctly with the fence. The code in the full Drop implementation at the bottom of the section is correct.
rc
Ordering::Release
ordering::Relaxed
Drop
The atomic decrement to
rc
should be performed with an ordering ofOrdering::Release
rather thanordering::Relaxed
to interact correctly with the fence. The code in the fullDrop
implementation at the bottom of the section is correct.