4 ms·
so just deep-clone your object before freezing / sealing, right?
by krebby 13y ago
so 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.