4 ms·
No, you can still mutate the array and it will influence the original model. http://jsbin.com/IvIXUZO/1/edit http://jsbin.com/IvIXUZO/1/edit
by bolshchikov 13y ago
No, you can still mutate the array and it will influence the original model.
http://jsbin.com/IvIXUZO/1/edit http://jsbin.com/IvIXUZO/1/edit
- krebby 13y agoso just deep-clone your object before freezing / sealing, right?
- Sharlin 13y agoNo need to freeze/seal if you deep-clone; it's not your business what the recipient does with its own copy. The point is, copying can be expensive. In C++, you can pass by copy, by reference, or by const reference. The idea is that a const reference means that the object is not modifiable through that reference, no matter whether it's itself const or not.
- krebby 13y agoso just deep-clone your object before freezing / sealing, right?