This is not a correct understanding. Both a
and b
refer to the array that is stored somewhere in memory. a
doesn’t own this array anymore than b
. In fact, there is no way you can tell the difference between a
and b
.
This might be useful: Converting a Matlab code into Julia - #18 by kristoffer.carlsson