Struct objc2::rc::StrongPtr [−][src]
pub struct StrongPtr(_);
Expand description
A pointer that strongly references an object, ensuring it won’t be deallocated.
Implementations
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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StrongPtr
impl UnwindSafe for StrongPtr
Blanket Implementations
Mutably borrows from an owned value. Read more