Hacker News new | past | comments | ask | show | jobs | submit login

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.




    { SomeClass makeitso; }
:)

Also, free(ptr++) is broken by design, the post increment value is useless. But free(*ptr++) is a good case.


> free(*ptr++)

Yes, of course - that's what I thought I'd written. Clearly not :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: