MCPcopy Create free account
hub / github.com/SSheldon/rust-objc / WeakPtr

Class WeakPtr

src/rc/weak.rs:13–13  ·  view source on GitHub ↗

A pointer that weakly references an object, allowing to safely check whether it has been deallocated.

Source from the content-addressed store, hash-verified

11/// A pointer that weakly references an object, allowing to safely check
12/// whether it has been deallocated.
13pub struct WeakPtr(Box<UnsafeCell<*mut Object>>);
14
15impl WeakPtr {
16 /// Constructs a `WeakPtr` to the given object.

Callers 2

newMethod · 0.85
cloneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected