(&self)
| 689 | T: HasAfEnum, |
| 690 | { |
| 691 | fn clone(&self) -> Self { |
| 692 | unsafe { |
| 693 | let mut temp: af_array = std::ptr::null_mut(); |
| 694 | let ret_val = af_retain_array(&mut temp as *mut af_array, self.handle); |
| 695 | match ret_val { |
| 696 | 0 => temp.into(), |
| 697 | _ => panic!("Weak copy of Array failed with error code: {}", ret_val), |
| 698 | } |
| 699 | } |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | /// To free resources when Array goes out of scope |