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 {
296296
297297 /// Makes an copy of the Array
298298 ///
299- /// Internally, this is handled by reference counting
299+ /// This does a deep copy of the data into a new Array
300300 pub fn copy ( & self ) -> Array {
301301 unsafe {
302302 let mut temp: i64 = 0 ;
@@ -383,7 +383,14 @@ impl From<i64> for Array {
383383 }
384384}
385385
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)
387394impl Clone for Array {
388395 fn clone ( & self ) -> Array {
389396 unsafe {
You can’t perform that action at this time.
0 commit comments