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

Method clone

src/rc/weak.rs:43–49  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

41
42impl Clone for WeakPtr {
43 fn clone(&self) -> Self {
44 let ptr = Box::new(UnsafeCell::new(ptr::null_mut()));
45 unsafe {
46 runtime::objc_copyWeak(ptr.get(), self.0.get());
47 }
48 WeakPtr(ptr)
49 }
50}

Callers 3

test_strong_cloneFunction · 0.45
test_weak_copyFunction · 0.45
test_autoreleaseFunction · 0.45

Calls 2

WeakPtrClass · 0.85
getMethod · 0.80

Tested by 3

test_strong_cloneFunction · 0.36
test_weak_copyFunction · 0.36
test_autoreleaseFunction · 0.36