4 ms·
Parameters of class type aren't passed by reference, either. Both instances of structs and instances of class are passed by value, except in the latter case the
by amomchilov 3y ago
Parameters of class type aren't passed by reference, either. Both instances of structs and instances of class are passed by value, except in the latter case the value being passed/copy is the reference. To pass by reference, you need `inout`.
- worik 3y agoNo. Classes are passed by reference. I still have trauma