4 ms·
I don't get enjoying every second line being "if (r == -1) goto cleanup" and then a cleanup block freeing every pointer which is not null. True, you can define
by cat_plus_plus 3y ago
I don't get enjoying every second line being "if (r == -1) goto cleanup" and then a cleanup block freeing every pointer which is not null. True, you can define macros to automate that, but then you just end up with clunkier version of C++ destructors. The rest depends on what you are doing, no need for heavy OOP for simple tasks and on the other hand automatic memory management is great when reliability is more important than hardware access or real time performance. But at least no reason to avoid automated facilities that replace well known red tape.