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

Method load

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

Loads the object self points to, returning a `StrongPtr`. If the object has been deallocated, the returned pointer will be null.

(&self)

Source from the content-addressed store, hash-verified

24 /// Loads the object self points to, returning a `StrongPtr`.
25 /// If the object has been deallocated, the returned pointer will be null.
26 pub fn load(&self) -> StrongPtr {
27 unsafe {
28 let ptr = runtime::objc_loadWeakRetained(self.0.get());
29 StrongPtr::new(ptr)
30 }
31 }
32}
33
34impl Drop for WeakPtr {

Callers 2

test_weakFunction · 0.80
test_weak_copyFunction · 0.80

Calls 1

getMethod · 0.80

Tested by 2

test_weakFunction · 0.64
test_weak_copyFunction · 0.64