Module shared_ptr

Module shared_ptr 

Source
Available on crate feature shared_ptr only.
Expand description

A reference counting smart pointer.

Structs§

NSTDSharedPtr
A reference counting smart pointer.

Functions§

nstd_shared_ptr_allocator
Returns an immutable reference to a shared object’s allocator.
nstd_shared_ptr_drop
Frees an instance of NSTDSharedPtr after invoking callback with the shared object.
nstd_shared_ptr_free
Frees an instance of NSTDSharedPtr.
nstd_shared_ptr_get
Returns an immutable raw pointer to the shared object.
nstd_shared_ptr_new
Creates a new initialized instance of a shared pointer.
nstd_shared_ptr_new_zeroed
Creates a new zero-initialized instance of a shared pointer.
nstd_shared_ptr_owners
Returns the number of pointers that share shared_ptr’s data.
nstd_shared_ptr_share
Shares shared_ptr.
nstd_shared_ptr_size
Returns the size of the shared object.

Type Aliases§

NSTDOptionalSharedPtr
Represents an optional value of type NSTDSharedPtr.