File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ impl Array {
296
296
297
297
/// Makes an copy of the Array
298
298
///
299
- /// Internally, this is handled by reference counting
299
+ /// This does a deep copy of the data into a new Array
300
300
pub fn copy ( & self ) -> Array {
301
301
unsafe {
302
302
let mut temp: i64 = 0 ;
@@ -383,7 +383,14 @@ impl From<i64> for Array {
383
383
}
384
384
}
385
385
386
- /// Used for incrementing the reference count of Array's native resource
386
+ /// Returns a new Array object after incrementing the reference count of native resource
387
+ ///
388
+ /// Cloning an Array does not do a deep copy of the underlying array data. It increments the
389
+ /// reference count of native resource and returns you the new reference in the form a new Array
390
+ /// object.
391
+ ///
392
+ /// To create a deep copy use
393
+ /// [copy()](http://arrayfire.org/arrayfire-rust/arrayfire/struct.Array.html#method.copy)
387
394
impl Clone for Array {
388
395
fn clone ( & self ) -> Array {
389
396
unsafe {
You can’t perform that action at this time.
0 commit comments