|
|
|
|
|
by dthul
2143 days ago
|
|
Yeah, maybe he was referring to constructors. That might make sense, since something like "MyType t;" could allocate.
I guess in the kernel context the STL (or whatever was around in 1992) would not be used though. Edit: or even something like "a = b" |
|
The problem gets magnified when you pass around these objects by value, thereby invoking copy constructors that also do those allocations, and doing value assignment, where you could have all those allocations happen again.
His comments predate r-value references, and a lot of stuff that r-value references have improved would be exactly the kinds of things where he saw a problem (though he'd hate the r-value solution).