|
|
|
|
|
by conradfr
4079 days ago
|
|
> Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. IIRC arrays are always passed by reference and only duplicated if you modify the data inside the called function (if not passed with '&' of course) ? |
|
Duplicating an array in memory every time it is passed to or from a function would be awful.