2 ms·
Because it's impossible to do this automatically in the general case. In particular, types may not be sendable to other threads, or may have side effects on dr
by devit 6y ago
Because it's impossible to do this automatically in the general case.
In particular, types may not be sendable to other threads, or may have side effects on dropping, and in those cases you would need to rearchitect the code before you can apply this technique.
Also this technique adds overhead, so it should never be used (including not doing it conditionally) if you don't care about latency or if the objects are always small, and the compiler cannot know whether that is the case.