r/csharp • u/PatrickSmacchia • Oct 12 '20
C#9 records: immutable classes
https://blog.ndepend.com/c9-records-immutable-classes/
118
Upvotes
r/csharp • u/PatrickSmacchia • Oct 12 '20
View all comments
Show parent comment
1
u/[deleted] Oct 12 '20
structs ending up IN the heap is not the same thing as being heap-allocated. Creating a struct does not make any malloc calls and that's important because malloc is, theoretically, a slow operation for some applications that are sensitive to that