()
| 91 | |
| 92 | #[test] |
| 93 | fn test_weak_copy() { |
| 94 | let obj = unsafe { |
| 95 | StrongPtr::new(msg_send![class!(NSObject), new]) |
| 96 | }; |
| 97 | let weak = obj.weak(); |
| 98 | |
| 99 | let weak2 = weak.clone(); |
| 100 | let strong = weak2.load(); |
| 101 | assert!(*strong == *obj); |
| 102 | } |
| 103 | |
| 104 | #[test] |
| 105 | fn test_autorelease() { |