3 ms·
Function calls seem right - particularly if they're badly written. Also, this macro might give curious results when passed in ptr++ . While this is C++, I've a
by copper 15y ago
Function calls seem right - particularly if they're badly written. Also, this macro might give curious results when passed in ptr++ .
While this is C++, I've actually seen this particular construct:
delete new SomeClass(...);
used as, basically, an eye-poppingly clever way of initializing something, doing work, and then cleaning up after.
- tedunangst 15y ago{ SomeClass makeitso; } :) Also, free(ptr++) is broken by design, the post increment value is useless. But free(*ptr++) is a good case.
- copper 15y ago> free(*ptr++) Yes, of course - that's what I thought I'd written. Clearly not :)