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
Our default interpolated string handler, StringBuilder handler, and MemoryExtensions handler are all passed to their target methods by ref. But we neglected to do so for the Debug handlers; we should update those signatures as well.
Benefits:
Consistency across all our handlers
These are typically larger structs and so by ref helps (though it doesn’t matter for Debug)
Making it a ref makes it even less attractive to try to call directly / makes it look even more special
It gives us the opportunity to more safely clean up at the end of the operation
Activity
bartonjs commentedon Aug 17, 2021
Video
Looks good as proposed. Hopefully we'll be diligent in the future at always using pass-by-ref when the handler is a struct.