Struct objc::rc::StrongPtr[][src]

pub struct StrongPtr(_);

A pointer that strongly references an object, ensuring it won't be deallocated.

Methods

impl StrongPtr
[src]

Constructs a StrongPtr to a newly created object that already has a +1 retain count. This will not retain the object. When dropped, the object will be released. Unsafe because the caller must ensure the given object pointer is valid.

Retains the given object and constructs a StrongPtr to it. When dropped, the object will be released. Unsafe because the caller must ensure the given object pointer is valid.

Autoreleases self, meaning that the object is not immediately released, but will be when the autorelease pool is drained. A pointer to the object is returned, but its validity is no longer ensured.

Returns a WeakPtr to self.

Methods from Deref<Target = *mut Object>

Trait Implementations

impl Drop for StrongPtr
[src]

Executes the destructor for this type. Read more

impl Clone for StrongPtr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Deref for StrongPtr
[src]

The resulting type after dereferencing.

Dereferences the value.

impl Pointer for StrongPtr
[src]

Formats the value using the given formatter.

Auto Trait Implementations

impl !Send for StrongPtr

impl !Sync for StrongPtr