Skip to main content

write_shared_ptr

Function write_shared_ptr 

Source
pub unsafe fn write_shared_ptr(cell: *const SharedCell, bits: u64)
Expand description

Write a raw 8-byte pointer payload to a SharedCell whose interior FieldKind is Ptr. The caller is responsible for refcount semantics — this writer does NOT release the previous payload nor retain the new one. For Ptr payloads the standard pattern is to read the old bits, release them, then write the new (already-retained) bits.

§Safety

cell must point to a live SharedCell whose interior FieldKind is Ptr.