4 ms·
Because nobody does this. An sv is a temporary you pass down the call chain, where it is uniformly perfectly safe. This is why I say it takes extra work to get
by ncmncm 4y ago
Because nobody does this. An sv is a temporary you pass down the call chain, where it is uniformly perfectly safe.
This is why I say it takes extra work to get things wrong. Every example purporting to show "unavoidable" memory faults is super contrived. You have to turn off compiler warnings to be able to miss it.
- imron 4y agoMy second example (the one you replied to) doesn't require you to turn off compiler warnings. It might seem contrived, and it is, but it's the essence of a bug that has happened in the real world, distilled to a 10 line example. And yeah, "use things properly or they will blow up", but enough people don't do that (or mostly do but occasionally slip up) that it becomes a problem.