Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
42
impl 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_clone
Function · 0.45
test_weak_copy
Function · 0.45
test_autorelease
Function · 0.45
Calls
2
WeakPtr
Class · 0.85
get
Method · 0.80
Tested by
3
test_strong_clone
Function · 0.36
test_weak_copy
Function · 0.36
test_autorelease
Function · 0.36