You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To stay on the safe side, marshal methods for objects with reference semantics should always clone by default and not modify th object that is being marshaled in-place. Because marshal() if often called right before sending the object to another process, it might be worth to optimize the special case where in-place modifications are allowed (or in general, the object that is being marshaled is not being further used).
The text was updated successfully, but these errors were encountered:
When marshaling objects that have reference semantics, having a
clone
/inplace
parameter for the(un)marshal
generics might be handy.The pseudocode below illustrates a call to
marshal()
, where cloning is not necessary and another call tounmarshal()
where it is necessary.To stay on the safe side, marshal methods for objects with reference semantics should always clone by default and not modify th object that is being marshaled in-place. Because
marshal()
if often called right before sending the object to another process, it might be worth to optimize the special case where in-place modifications are allowed (or in general, the object that is being marshaled is not being further used).The text was updated successfully, but these errors were encountered: